What is Firefox? Firefox is a free, open-source web browser for Windows, Linux and Mac OS X and is based on the Mozilla codebase. It is small, fast and easy to use, and offers many advantages over Internet Explorer, such as the ability to block pop-up windows.Firefox 1.5,have many features for XML developers,
Loading XML Data in FirefoxFirefox supports the load() method. Firefox implemented the async property, You can set async to false forces the document to be loaded in synchronous mode; otherwise, the document is loaded asynchronously. oXmlDom.load("address.xml"); Retrieving XML Data in FirefoxFirefox supports the W3C standards properties of attributes, childNodes, firstChild, lastChild, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, and previousSibling. So first you need to retrieve the root element of the document by using the documentElement property, var foxRoot = foxoXmlDom.documentElement; An example about how to return content of the node function getText(foxNode) { var sText = ""; for (var i = 0; i < foxNode.childNodes.length; i++) { if (foxNode.childNodes[i].hasChildNodes()) { sText += getText(foxNode.childNodes[i]); } else { sText += foxNode.childNodes[i].nodeValue; } } return sText; } Using XMLSerializer to serialize XMLfunction serializeXml(foxNode) { var oSerializer = new XMLSerializer(); return oSerializer.serializeToString(foxNode); } |