I’ve got XML coming back from an Ajax.Request in Ajax.Response.responseXML. My XML actually contains XHTML tags which I hope to append into my document.
I’m having issues appending nodes from the responseXML into the current document, however. I suspect that this is because they are XML nodes and not DOM nodes.
Wrapping the responseXML in $() doesn’t seem to return an extended version of the nodes, either, and the documentation doesn’t say that it will or won’t.
Does Prototype provide a way to make use of the responseXML, and if not, is there a cross-browser way to parse the response and use it?
No prototype does not have a native way to parse XML. Nor can you extend the xml with $(xml) and then walk the DOM with .next(),.select(), etc.
Here is an example of what I did recently on a project to manually parse some XML from spell check results. Should get you started.