So, in Javascript, I work a lot with json.
This is simple as it looks like a js object. So all I need to do when getting json back from an HTTP request is to parse it to a js object. When I want to send the js object as json, I build it.
But some APIs just return XML.
How do I interact with XML? Am I parsing it with an object with XMLtoObject lib? Is there a built-in method in js?
Or am I using the xpath / css selector to get what I want on this line? How to add items, etc.
Hope someone can shed some light on this topic.
Hooray!
ajsie source
share