When creating XML with jQuery should use $ ('<xml / ">') or $ .parseXML ('<xml /">')?
1 answer
According to the documentation for parseXML
jQuery.parseXML uses the built-in browser parsing function to create a valid XML document. You can then pass this document to jQuery to create a typical jQuery object that you can move and manipulate.
So, if you are trying to create an XML document, you would like to use parseXML .
Per Esailija, you can make
$($.parseXML(xml)) and go through an XML document using jQuery. Do not pass the string directly, as xml is interpreted as html will have different rules. For example, in html, the param tag should be a closing tag.+4