Latest Tutorials

Example with general node interface methods in XML

The XML file and Javascript file to load the XML. myData.xml <?xml version='1.0'?> <root>

Example of length method

xmldoc = loadXMLDoc(“myData.xml”);    x = xmldoc.getElementsByTagName(“book”);    document.write(x.item(0).att...

Example of getElementsByTagNameNS() method

<!DOCTYPE html> <html>    <body>       <h1>document interface </h1>&nb...

Example of how to add a new element node to an XML file

myData.xml <?xml version='1.0'?> <root>     <data>   &nb...

Example of how to add attribute's name and value to XML

The example adds attribute name and value to the <data> element of the xml document. It also displays the name and textContent attributes....

Example how to add a CDATASection to the XML DOM

myData.xml <?xml version='1.0'?> <root>     <data>   &nb...

Example how to delete a text element and add a new one to a XML

myData.xml <?xml version='1.0'?> <root>     <data>   &nb...

Example with createElement() method

element.xml <?xml version="1.0"?> <students>       <name>Roshni</name&...

Example with createElementNS() method

<!DOCTYPE html> <html>       <body>   ...

Example of XML DOM properties

The example below shows usage of some of the properties explained above. element.xml <?xml version='1.0'?> <r...