How to get the XML document part after using $.get()
Hi folks,
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.
Any ideas?
Kind regards,
Yomodo