XML DOM
Warning! This page is not complete! The reader should refer to the DOM documentation at the World Wide Web Consortium web site.
The Document Object Model (DOM) is a programming model that represents parts of an XML document as objects. Each object is thereby accessible by referring to the object and subobjects with periods between them. Each object supports specific attributes and methods which allows dynamic content using XML. The DOM is cross platform compatible. It allows scripts and programs to access and update the content and style of elements in a document. The DOM presents documents as a hierarchy of nodes.
Node Types
- Leaf - Can not have anything below them.
- Normal - Nodes may have children nodes.
| Node Types | May Contain |
| Document | Document type, Element, Processing Instruction, Comment |
| Document Fragment | Entity reference, Element, Processing Instruction, Comment, Text, CDATA Section |
| Document Type | - |
| Entity Reference | Entity reference, Element, Processing Instruction, Comment, Text, CDATA Section |
| Element | Entity reference, Element, Processing Instruction, Comment, Text, CDATA Section |
| Attr | Entity reference, Textn |
| Processing Instructioon | - |
| Comment | - |
| Text | - |
| CDATA Section | - |
| Entity | Entity reference, Element, Processing Instruction, Comment, Text, CDATA Section |
| Notation | - |
Node List - To handle lists of nodes. Named Node Max - For unorded sets of nodes. APIs in DOM are generally interfaces, not classes.
Type Definitions
DOMString - UTF-16 sequence of character units. also bound to the "String" type.
DOM Exceptions
DOM exceptions are defined by "exception DOMException". They are:
- DOMSTRING_SIZE_ERR
- HIERARCHY_REQUEST_ERR
- INDEX_SIZE_ERR
- INUSE_ATTRIBUTE_ERR
- INVALID_CHARACTER_ERR
- NOT_FOUND_ERR
- NOT_SUPPORTED_ERR
- NO_DATA_ALLOWED_ERR
- NO_MODIFICATION_ALLOWED_ERR
- WRONG_DOCUMENT_ERR
|
|