问题
Does one of the mainstream JavaScript libraries (YUI, jQuery, Dojo) provide a way to serialize a JavaScript object to XML (as text)?
回答1:
There is no native API for native object to XML serializing; however, there are 3rd party libraries such as this one which will output XML: http://code.google.com/p/x2js/
See other threads on the subject.
来源:https://stackoverflow.com/questions/837577/how-to-serialize-a-generic-javascript-object-to-xml