You may simply parse it as a simple content of a child node (using the property: data)
in JavaScript (+-AJAX)
Code:
var content=xmldocument.documentElement.getElementsByTagName('payload')[0].firstChild.data;
To prevent a crossbrowser problem regarding the counting of the child nodes (IE vs other browsers) you may use a small function and check the nodeType:
Code:
var content=returnCDATA(xmldocument.documentElement.getElementsByTagName('payload')[0].firstChild);
function returnCDATA(elem){
while(elem.nodeType!=4){
elem=elem.firstChild;
}
return elem.data;
}
Bookmarks