I suppose that if you write:

function handleResponse(data)
{
        var xml = $(data.responseXml)
}


the xml var is a DOM xml file.
But I don't try it.
Cheers,
-- Francesco


Dmitrii 'Mamut' Dimandt ha scritto:
I need to load and process a local XML file from a page displayed
locally. However, if XML is loaded through .get, it is passed to the
processing function as text, not as a document. How can I ensure that
the XML that is loaded gets parsed and presented as DOM?

That is, I need to to something like:

$(document).ready(
    function() {
       $("a.ex").click(
          function() {
             $.get(
                $(this).attr("href"),
                handleResponse
             )
          }
       );
    }
);

function handleResponse(data)
{
    // do stuff not with text that gets passed, but wit DOM
}

....
HTML:
<a href="xml/1.xml" class="ex">Example 1</a>
<a href="xml/2.xml" class="ex">Example 2</a>



Thank you.

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to