Answer the question
In order to leave comments, you need to log in
How to pass xml posts requests to node.js? And how to handle the response?
How to pass xml posts requests to node.js? And how to handle the response?
Please tell me where you can read in detail, or maybe you can write an example code yourself, thanks in advance for all the answers.
Request example:
URL для передачи запроса: http://shop.digiseller.ru/xml/shop_categories.asp
<digiseller.request>
<seller>
<id>505197</id>
</seller>
<category>
<id></id>
</category>
<lang></lang>
</digiseller.request>
<digiseller.response>
<retval></retval>
<retdesc></retdesc>
<categories>
<category cnt="" sub="">
<id></id>
<name></name>
</category>
<category cnt="" sub="">
<id></id>
<name></name>
<category cnt="" sub="">
<id></id>
<name></name>
...
</category>
</category>
...
</categories>
</digiseller.response>
Answer the question
In order to leave comments, you need to log in
XML is evil, with JSON there is absolutely no reason to use it unless it's for compatibility with old and legacy applications. There is a parser for the node: https://github.com/fb55/htmlparser2/
Perhaps this is suitable (if you need shaping and parsing xml): https://github.com/dylang/node-xml
Or if you need only parsing: https://github.com/Leonidas-from-XIV/node-xml2js
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question