XML Dom
XML Dom
❮ PreviousNext ❯
XML DOM
"The W3C Document Object Model (DOM) is a platform and language-neutral interface
that allows programs and scripts to dynamically access and update the content,
structure, and style of a document."
The HTML DOM defines a standard way for accessing and manipulating HTML documents.
It presents an HTML document as a tree-structure.
The XML DOM defines a standard way for accessing and manipulating XML documents. It
presents an XML document as a tree-structure.
Understanding the DOM is a must for anyone working with HTML or XML.
Example
<h1 id="demo">This is a Heading</h1>
<script>
document.getElementById("demo").innerHTML = "Hello World!";
</script
A W3C standard
In other words: The XML DOM is a standard for how to get, change, add, or delete
XML elements.
Example
txt = xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue;
Try it Yourself »