|
DOMElement | documentElement |
| The node, which represents the outermost structure element of the document. More...
|
|
DOMNamedNodeMap | attributes |
| A map of DOM attributes. If this node is not a DOMElement, the value is null . The property is readonly.
|
|
DOMNodeList | childNodes |
| A list of all children of this node. The property is readonly.
|
|
DOMNode | firstChild |
| The first child node, otherwise null . The property is readonly.
|
|
DOMNode | lastChild |
| The last child node, otherwise null . The property is readonly.
|
|
DOMNode | nextSibling |
| The next sibling node, otherwise null . The property is readonly.
|
|
String | nodeName |
| The name of this node. The property is readonly.
|
|
Integer | nodeType |
| The type or subclass of a this node, encoded as an integer. The property is readonly.
|
|
String | nodeValue |
| The value of the node, which depends on the type. More...
|
|
DOMDocument | ownerDocument |
| The document, which owns this node. The property is readonly.
|
|
DOMNode | parentNode |
| The parent node or null . The property is readonly.
|
|
DOMNode | previousSibling |
| The previous sibling node, otherwise null . The property is readonly.
|
|
Integer | ELEMENT_NODE |
| Constant for the nodeType "Element". The actual subclass is DOMElement.
|
|
Integer | ATTRIBUTE_NODE |
| Constant for the nodeType "Attr". The actual subclass is DOMAttr.
|
|
Integer | TEXT_NODE |
| Constant for the nodeType "Text". The actual subclass is DOMCharacterData, differing from the standard.
|
|
Integer | CDATA_SECTION_NODE |
| Constant for the nodeType "CDATASection". The actual subclass is DOMCharacterData, differing from the standard.
|
|
Integer | ENTITY_REFERENCE_NODE |
| Constant for the nodeType "EntityReference". The actual implementation does not provide a subclass for this type.
|
|
Integer | ENTITY_NODE |
| Constant for the nodeType "Entity". The actual implementation does not provide a subclass for this type.
|
|
Integer | PROCESSING_INSTRUCTION_NODE |
| Constant for the nodeType "ProcessingInstruction". The actual implementation does not provide a subclass for this type.
|
|
Integer | COMMENT_NODE |
| Constant for the nodeType "Comment". The actual subclass is DOMCharacterData, differing from the standard.
|
|
Integer | DOCUMENT_NODE |
| Constant for the nodeType "Document". The actual subclass is DOMDocument.
|
|
Integer | DOCUMENT_TYPE_NODE |
| Constant for the nodeType "DocumentType". The actual implementation does not provide a subclass for this type.
|
|
Integer | DOCUMENT_FRAGMENT_NODE |
| Constant for the nodeType "DocumentFragment". The actual implementation does not provide a subclass for this type.
|
|
Integer | NOTATION_NODE |
| Constant for the nodeType "Notation". The actual implementation does not provide a subclass for this type.
|
|
The DOMDocument is the root of a DOM tree.
The constructor of this class always creates an empty document structure. Use the class DOMParser to obtain the structure of an existing XML. To create any new child nodes, a script must call the appropriate create method of the DOMDocument. It is not possible to create child nodes standalone.
After a DOMDocument has been deleted by the scripting engine's garbage collector, accessing any nodes and lists of that document may issue an error. You should avoid code like the following.
function buildSomeElement()
{
var someElement = domDoc.createElement("Test");
return someElement;
}
Remarks about W3C conformity
The class covers much of the Document interface of DOM level 1, but the following properties and functions have not been implemented until now.
- DocumentType doctype
- DOMImplementation implementation
- DocumentFragment createDocumentFragment()
- ProcessingInstruction createProcessingInstruction(String target, String data)
- EntityReference createEntityReference(in String name)
The native DOM library behind the scripting API already supports at least DOM level 2. This is worth knowing, because the behaviour of a few operations might have changed with level 2.
- Since
- DOCUMENTS 4.0c