You could try using the dataType option in $.ajax:

$.ajax({
   type: "GET",
   url: "mypage.php",
   data: "id=1",
   dataType: "xml"
   success: function(msg){
     // do something
   }
 });

The HTML should be valid XML as well (i.e. if you changed the
extension to 'xml' you could open it in IE (or any XML editor) without
any parsing errors).

On May 16, 9:30 am, tcollogne <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a static html page containing xml code. Problem is that when I do an
> ajax request to get the content, it is always returned as a text/html
>
> I would like to parse the return string as a dom document. It is impossible
> for us to change the extension, so I was wondering if there is a possibility
> to convert the return string to a dom document.
>
> I use sarissa now for this, but It would be much better if jquery had
> somthing like this.
>
> Can somebody help me please?
> --
> View this message in 
> context:http://www.nabble.com/Convert-xml-string-to-dom-document-tf3763257s15...
> Sent from the JQuery mailing list archive at Nabble.com.

Reply via email to