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/

Reply via email to