A
A
Alexey Kostyukhin2020-08-06 09:16:22
Node.js
Alexey Kostyukhin, 2020-08-06 09:16:22

How to get data from xml using nodejs?

Good afternoon, there are a lot of xml files in which error logs lie, or rather information in which files certain data was not uploaded. The crux of the problem is that there are two "trees"

<ErrorFiles></ErrorFiles>
<LoadFiles></LoadFiles>


I need to get data from the "tree" ErrorFiles in it there is another tree and in it information>
screenshot for clarity:
spoiler
5f2b9fc9685f7950562141.bin

and write them to internal files, for example, error.txt

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
necrodeflorator, 2020-08-06
@aleksey4uk

google://npm parse xml

V
Vladimir Korotenko, 2020-08-06
@firedragon

Any xml parser, this one for example.
https://github.com/NaturalIntelligence/fast-xml-pa...
Take an example and save what you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question