[jQuery] XSL changing in XML object during html() call
I'm having trouble using the html() function to place XSL in a XML
object so I can parse through it using the find function. The code is:
var newel = $("<xml>");
newel.html([xsl as string]);
When alerting newel.html() immediately after, the XSL has changed and
an xsl:template node and the xsl:stylesheet node are closing early.
For some reason, it is not happening with all xsl files.
I've also tried $("<xml>" + [xsl as string + "</xml>") which causes a
slightly different result, but still not correct and have even tried
using a div or some other type of element yet none work.
Any thoughts on why the XSL is changing? Is there a better way to loop
through the XSL string and modify certain node values?