View Full Version : using responseXML

09-07-2007, 08: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
09-08-2007, 09: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.

09-08-2007, 01: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.



09-09-2007, 02: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