ZVON > References > DOM1 Reference


DOM1-core interfaces

DOMImplementation, DocumentFragment, Document, Node, NodeList, NamedNodeMap, CharacterData, Attr, Element, Text, Comment - all conforming implementations of the DOM (including HTML-only ones) must fully implement these interfaces.
CDATASection, DocumentType, Notation, Entity, EntityReference, ProcessingInstruction - these interfaces are XML-oriented so HTML-only DOM implementation do not need to implement these objects.

Node Types

const unsigned short      ELEMENT_NODE                = 1
const unsigned short      ATTRIBUTE_NODE              = 2
const unsigned short      TEXT_NODE                   = 3
const unsigned short      CDATA_SECTION_NODE          = 4
const unsigned short      ENTITY_REFERENCE_NODE       = 5
const unsigned short      ENTITY_NODE                 = 6
const unsigned short      PROCESSING_INSTRUCTION_NODE = 7
const unsigned short      COMMENT_NODE                = 8
const unsigned short      DOCUMENT_NODE               = 9
const unsigned short      DOCUMENT_TYPE_NODE          = 10
const unsigned short      DOCUMENT_FRAGMENT_NODE      = 11
const unsigned short      NOTATION_NODE               = 12

root element

XML document can have more elements on the "root"-level, such as DocumentType or Comment nodes and the XML root (as defined in DTD for example) itself. Therefore DOM root element is in fact the parent of the XML root element. (For HTML documents, this is the element with the tagName "HTML".)


Siblings nodes are nodes which immediately follows/precedes one another.


Other data types


INDEX_SIZE_ERR                  If index or size is negative, or greater than the allowed value
DOMSTRING_SIZE_ERR              If the specified range of text does not fit into a DOMString
HIERARCHY_REQUEST_ERR           If any node is inserted somewhere it doesn't belong
WRONG_DOCUMENT_ERR              If a node is used in a different document than the one that created it (that doesn't support it)
INVALID_CHARACTER_ERR           If an invalid character is specified, such as in a name.
NO_DATA_ALLOWED_ERR             If data is specified for a node which does not support data
NO_MODIFICATION_ALLOWED_ERR     If an attempt is made to modify an object where modifications are not allowed
NOT_FOUND_ERR                   If an attempt was made to reference a node in a context where it does not exist
NOT_SUPPORTED_ERR               If the implementation does not support the type of object requested
INUSE_ATTRIBUTE_ERR             If an attempt is made to add an attribute that is already inuse elsewhere


The XML Pointer Language (XPointer) - the language to be used as a fragment identifier for any URI-reference that locates a resource of Internet media type text/xml or application/xml. XPointer, which is based on the XML Path Language (XPath), supports addressing into the internal structures of XML documents. It allows for traversals of a document tree and choice of its internal parts based on various properties, such as element types, attribute values, character content, and relative position.