I'm not sure it's a bug... :-S
Personally, I think it's best practice to use something along the lines of
the text2html function I posted (below)

// Convert text to XML DOM
var text2xml = function(s) {
 var x, ie = /msie/i.test(navigator.userAgent);
 try{
  var p = ie? new ActiveXObject("Microsoft.XMLDOM") : new DOMParser();
  p.async = false;
 }catch(e){ throw new Error("XML Parser could not be instantiated") };
 try{
  if(ie) x = p.loadXML(s)? p : false;
  else x = p.parseFromString(s, "text/xml");
 }catch(e){ throw new Error("Error parsing XML string") };
 return x;
};


2008/7/16 Tzury <[EMAIL PROTECTED]>:

>
> > Yeah it's a kind of bug in jQuery ...
> >
> > I dealt with this issue one month ago and the solution was to convert
> > it into JSON
>
> the way I am planning to approach is by building in-memory DOM element
> and injecting the XML into it.
>
> example:
> var el = document.createElement('div');
> el.innerHTML = xml;
> alert(el.firstChild.innerHTML);
>
> utilizing jQuery facilities for DOM traversing is the next obvious
> step.
>
> hope someone will notice this and file a bug for the dears jQuery
> developers.
>



-- 
Cheers,
Diego A.

Reply via email to