Hi,

You can use standard DOM properties and method. For example, since you
have an XMLDocument you can ask for the root element:

var myRootXMLElement = myXMLDoc.getDocumentElement();

or get element by their local name:

var allParas = myXMLDoc.getElementsByTagName("p");

Check out:
http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html

best,
-Rob




On Mon, 2007-10-01 at 11:40 -0700, Lee Hinde wrote: 
> Firebug is great for this sort of stuff; it'll show you exactly what
> is coming back.
> 
> http://www.getfirebug.com/
> 
> 
> On 9/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I've been trying to getsome XML data out of a jQuery AJAX request and
> > I'm having trouble. Problem is, I can't read the returned XML to see
> > what is being sent.
> >
> > CODE:
> >
> > $.ajax({
> >         type: "POST",
> >         url: "/cgi-bin/monitor.cgi",
> >         data: dat,
> >         dataType: "xml",
> >         success: function(xml){
> >                 var str="";
> >                 for(var g in xml){
> >                         str+=g+':'+xml[g]+'\\n';
> >                 }
> >                 alert(str);
> >                 $("/progress",xml).each(function(){
> >                         var _duration=$("duration",this).text();
> >                         var _mark=$("mark",this).text();
> >                         
> > alert("qf{'queue_name'}_monitor"+_duration+":"+_mark);
> >                         
> > //$("#"+queuename+"_monitor").html(_duration+":"+_mark);
> >                 });
> >         },
> >         error: function(err,ex,x){
> >                 //alert("Error in monitor script!");
> >                 clearInterval(queuename+"_progressInterval");
> >         }
> > });
> >
> > The alert(str) part of the code (trying to get a list of properties of
> > the returned object) gives me a runtime error on firefox and fails
> > with "Object doesn't support this action"on IE7. Forefox reports the
> > returned objects as an "XMLDocument" object but I can't seem to access
> > any properties of it. Any ideas? Can someone point me at a way to get
> > the text of the returned objkect maybe so I can test it?
> >
> >

Reply via email to