Thursday, November 18, 2010

XML DOM

XMLHttpRequest
http://www.w3.org/TR/XMLHttpRequest/

// Sample about  XMLHttpRequest
jQuery.ajax(...,
    success: function(data, textStatus, XMLHttpRequest)...

XMLDocument
http://www.w3schools.com/Xml/xml_parser.asp 


Convert iframe content to XMLDocument
// for IE
var xDoc = iframe1.contentWindow.document.XMLDocument;
// for Firefox
var parser = new DOMParser();
var xmlString = (new XMLSerializer()).serializeToString(iframe1.contentDocument.documentElement);
var xDoc = parser.parseFromString(xmlString, "text/xml");