TDOMDocument class
Implements the DOM Document interface.
Declaration
TDOMDocument = class(TDOMNode_WithChildren)Inheritance
- TDOMDocument
- TDOMNode_WithChildren
- TDOMNode
Descends from it: TXMLDocument
Description
TDOMDocument is a
TDOMNode_WithChildren descendant that
implements the DOM Document interface from the DOM specification.
TDOMDocument is the container that represents the content for the entire HTML
or XML document. It acts as the root of the DOM tree.
TDOMDocument provides factory methods needed to create elements, attributes, text nodes, comments, processing instructions, etc. These items cannot exist without an owner document. It also provides methods used to import nodes created in another document or document fragment.
TDOMDocument provides support for XML Namespaces introduced in DOM Level 2. The following namespace prefixes and URIs are always assigned in TDOMDocument:
| Prefix | Namespace URI |
| xml | http://www.w3.org/XML/1998/namespace |
| xmlns | http://www.w3.org/2000/xmlns/ |
TDOMDocument includes the DocumentURI property introduced in DOM Level 3.
See also
Properties
DocType | public | Document Type declaration used in the document. |
Impl | public | Provides access to the DOM Implementation for the document. |
DocumentElement | public | Gets the root element for the document. |
documentURI | public | Represents the DOM Level 3 Document URI. |
Names | public | Hash table representing qualified names used in the document. |
Methods
GetDocumentElement | protected | Gets the value for the DocumentElement property. |
GetDocType | protected | Gets the value for the DocType property. |
GetNodeType | protected | Gets the value for the NodeType property. |
GetNodeName | protected | Gets the value for the NodeName property. |
GetTextContent | protected | Gets the value for the TextContent property. |
GetOwnerDocument | protected | Gets the value for the OwnerDocument property. |
SetTextContent | protected | Sets the value for the TextContent property. |
RemoveID | protected | Removes a DOM element from the hash table used for IDs in the document. |
GetChildNodeList | protected | Gets a DOM Node List with the children for the specified DOM Node. |
GetElementList | protected | Gets a DOM Element List with elements found in the specified DOM Node. |
NodeListDestroyed | protected | Signals that the specified list can be removed from the internal hash table. |
Alloc | protected | Ensures the DOM node class type is allocated using the Node pool for the document. |
IndexOfNS | public | Gets the ordinal position for the specified namespace URI in the document namespaces. |
InsertBefore | public | Inserts a DOM Node prior to the reference DOM node. |
ReplaceChild | public | Replaces a child node with another DOM node. |
CreateElement | public | Creates an element in the document with the specified tag name. |
CreateElementBuf | public | Creates an element in the document with the specified tag name. |
CreateDocumentFragment | public | Creates a new DOM Document Fragment. |
CreateTextNode | public | Creates a new DOM Text node with the specified value. |
CreateTextNodeBuf | public | Creates a new DOM Text node with the specified value. |
CreateComment | public | Creates a new DOM Comment with the specified content. |
CreateCommentBuf | public | Created a new DOM Comment using the specified content. |
CreateCDATASection | public | Creates a new DOM CDATA section with the specified content. |
CreateProcessingInstruction | public | Creates a new DOM Processing Instruction. |
CreateAttribute | public | Creates a new DOM Attribute with the specified name. |
CreateAttributeBuf | public | Creates a new DOM Attribute with the specified name. |
CreateAttributeDef | public | Creates a new Attribute with a default value. |
CreateEntityReference | public | Creates a new DOM Entity Reference for the specified name. |
GetElementsByTagName | public | Gets a list of nodes with the specified tag name. |
ImportNode | public | Imports a copy of the DOM node into the current document. |
CreateElementNS | public | Creates a new DOM Element with the specified Namespace URI. |
CreateAttributeNS | public | Creates a new Attribute with the specified Namespace URI and qualified name. |
GetElementsByTagNameNS | public | Gets a list of nodes with the specified Namespace URI and local name. |
GetElementById | public | Gets the DOM Element with the specified ID attribute value. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
AddID | public | Adds an ID Attribute value to a hash list used in the Document. |
Fields
FIDList | protected | |
FRevision | protected | |
FXML11 | protected | |
FImplementation | protected | |
FNamespaces | protected | |
FNames | protected | |
FEmptyNode | protected | |
FNodeLists | protected | |
FMaxPoolSize | protected | |
FPools | protected | |
FDocumentURI | protected |
Inherited
From TDOMNode_WithChildren (9)
CloneChildren DetachChild FindNode FreeChildren GetChildCount GetFirstChild GetLastChild HasChildNodes InternalAppend
From TDOMNode (47)
AppendChild Attributes baseURI Changing ChildNodes CloneNode CompareName FirstChild Flags FreeInstance GetAttributes GetBaseURI GetChildNodes GetEnumerator GetEnumeratorAllChildren GetLastLeaf GetLevel GetLocalName GetNamespaceURI GetNextNode GetNextNodeSkipChildren GetNodeValue GetPrefix GetPreviousNode GetRevision HasAttributes IsDefaultNamespace IsSupported LastChild LocalName LookupNamespaceURI LookupPrefix NamespaceURI NextSibling NodeName NodeType NodeValue Normalize OwnerDocument ParentNode Prefix PreviousSibling RemoveChild SetNodeValue SetPrefix SetReadOnly TextContent
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
