I'm currently working on a pretty straight-forward AJAX application. In this application, I get some XML, and then parse it. An example of what I'm working with is as such:
Now, I've been able to read the XML with [icode]XMLHttpRequest[/icode], my trouble is with parsing the results. I've tried tons of things, but I just can't seem to get the different child nodes.
Now, let's say we have something like this:
var xml = xhr.responseXML;
var allPosts = xml.getElementsByTagName('post');[/code]
Could I use [icode]childNode[/icode] to access [icode]user[/icode] & [icode]content[/icode]? And if so, how? I've tried many things, but nothing is working :/ Is there a better way to parse the results I get back from the server?