Given the following standard jQuery code to .get() a (valid) .xml file:
$.get(file)
.success(function(data, textStatus, jqXHR) {
oUIxml = $(data);
});
Later on, I need the XML document part from the oUIxml jQuery object. Is there any way to achieve this without using something like .each() ?
If I do:
alert( oUIxml.text() );
It'll get me all the text values from all nodes as one big chunk of text. But what I need is only the XML document, in fact just like:
alert( jqXHR.responseText() );
This is exactly what I need, it'll get me the complete XML document structure, including all nodes and texts. If I have this as a string I can then use $.parseXML() to convert this (back) into a XML document.
Unfortunately the ticket has been closed with an unsatisfying respose, in my opinion. Perhaps I'm overlooking something, that's why I need you guys (and girls) for a second, third... opinion.
My objective: Locally, from within a .HTA, load a valid .xml file and retrieve the returned XML object through the responseXML method. I use the jQuery method: $.get() for loading the .xml file.
I only keep getting back "undefined" in IE9 whereas Firefox 3.6 clearly returns an XML Object, as it should be. My goal is to transform this XML object with an .XSL stylesheet.
I can only reach this goal by using the responseText method, which then has to be converted back to an XML object, which doesn't make any sense to me.