View Full Version : using responseXML

Sep 7th, 2007, 09:39 PM
ok I want to use responseXML in ajax because I'm generating two tables in jsp and sending it to my js file. Now these are two simple tables like so:

some trs, some tds, few select boxes
some trs, some tds

thats all thats in the string that jsp response gives to AJAX, I would just like to know how to give these to AJAX in xml (wanna know if ill have to learn xml just for this?) so if anybody can post the conversion i'd be much obliged

rnd me
Sep 8th, 2007, 10:53 AM
for me, i think it would be easier and simpler to send them as JSON. This also leverages your js knowledge in lieu of learning xml just to deliver data to script.

Sep 8th, 2007, 02:30 PM
If you want to use responseXML, the document has to be a valid xml document. The code you posted is not a valid xml document.



Sep 9th, 2007, 03:13 AM
yea I know my format is far from being xml, I wanted to know how I can get responseXML to contain such an arrangement and how I can display it with my AJAX

hmm looking at JSON now...thx I wasn't aware JSON existed :D