- We may want to implement a small editor for address files
- we need to access the XML data from a program
- this is the role of the DOM
- DOM is a programmatic interface to the runtime XML tree
- interface definition in OMG's IDL, ECMAScript and Java
- others define language bindings (eg, for Python)
- Examples for DOM functions:
nElements = dom.getElementsByTagName("Name")
w = tel.getAttribute("where")
if node.nodeType == node.TEXT_NODE: rc = node.data
p = doc.createElement("Picture")
p.setAttribute("width",800)
pers.appendChild(p)