Using Response XML

M

Mister Joe

Is there an easy way to use responseXML w/o recreating the tags. I've
tried taking tags that are returned from the responseXML and appending
them to other tags in the document but then I have no luck accessing
the properties of the elements from the responsexml.

Thanks
 
O

Olorin

Is there an easy way to use responseXML w/o recreating the tags. I've
tried taking tags that are returned from the responseXML and appending
them to other tags in the document but then I have no luck accessing
the properties of the elements from the responsexml.

I believe the easy and only way to use the stuff in responseXml is by
adding it to some preset element, assuming your user agent is ok with
innerHtml.

This is based on the lack of response I got to the similar quesiton I
asked at the end of the following thread, not long ago:
http://groups.google.com/group/comp...0c38?lnk=gst&q=Olorin&rnum=6#540bffc1c4150c38

HTH,
F.O.R.
 
R

RobG

I believe the easy and only way to use the stuff in responseXml is by
adding it to some preset element, assuming your user agent is ok with
innerHtml.

This is based on the lack of response I got to the similar quesiton I
asked at the end of the following thread, not long ago:http://groups.google.com/group/comp.lang.javascript/browse_frm/thread...

If you are using XML, you can create an XML document object and then
use DOM Core methods to deal with it. This recent thread shows how:

<URL: http://groups.google.com.au/group/c...93785/3b2118dc51fae143?hl=en#3b2118dc51fae143
However, that is only good for getting the data out and using it in
the HTML document, I don't think you can just grab XML DOM elements
and drop them into an HTML document. So given that the XML document
becomes just a data transport, JSON becomes the obvious choice because
it is simple to generate a javascript object and work with it, no XML
support required. It is also kind of XML-ish.

The idea of using innerHTML is so you can send HTML and just drop it
into the document. Also, a number of libraries allow you to use DOM-
like manipulation (insert, append, wrap, etc.) using HTML strings
rather than DOM objects.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,427
Latest member
HildredDic

Latest Threads

Top