Sign in Join
FPDoc Onlineexperiment

TDOMDocument class

In unit Laz2_DOM

Implements the DOM Document interface.

Declaration

pascal
TDOMDocument = class(TDOMNode_WithChildren)

Inheritance

  1. TDOMDocument
  2. TDOMNode_WithChildren
  3. 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

DocTypepublicDocument Type declaration used in the document.
ImplpublicProvides access to the DOM Implementation for the document.
DocumentElementpublicGets the root element for the document.
documentURIpublicRepresents the DOM Level 3 Document URI.
NamespublicHash table representing qualified names used in the document.

Methods

GetDocumentElementprotectedGets the value for the DocumentElement property.
GetDocTypeprotectedGets the value for the DocType property.
GetNodeTypeprotectedGets the value for the NodeType property.
GetNodeNameprotectedGets the value for the NodeName property.
GetTextContentprotectedGets the value for the TextContent property.
GetOwnerDocumentprotectedGets the value for the OwnerDocument property.
SetTextContentprotectedSets the value for the TextContent property.
RemoveIDprotectedRemoves a DOM element from the hash table used for IDs in the document.
GetChildNodeListprotectedGets a DOM Node List with the children for the specified DOM Node.
GetElementListprotectedGets a DOM Element List with elements found in the specified DOM Node.
NodeListDestroyedprotectedSignals that the specified list can be removed from the internal hash table.
AllocprotectedEnsures the DOM node class type is allocated using the Node pool for the document.
IndexOfNSpublicGets the ordinal position for the specified namespace URI in the document namespaces.
InsertBeforepublicInserts a DOM Node prior to the reference DOM node.
ReplaceChildpublicReplaces a child node with another DOM node.
CreateElementpublicCreates an element in the document with the specified tag name.
CreateElementBufpublicCreates an element in the document with the specified tag name.
CreateDocumentFragmentpublicCreates a new DOM Document Fragment.
CreateTextNodepublicCreates a new DOM Text node with the specified value.
CreateTextNodeBufpublicCreates a new DOM Text node with the specified value.
CreateCommentpublicCreates a new DOM Comment with the specified content.
CreateCommentBufpublicCreated a new DOM Comment using the specified content.
CreateCDATASectionpublicCreates a new DOM CDATA section with the specified content.
CreateProcessingInstructionpublicCreates a new DOM Processing Instruction.
CreateAttributepublicCreates a new DOM Attribute with the specified name.
CreateAttributeBufpublicCreates a new DOM Attribute with the specified name.
CreateAttributeDefpublicCreates a new Attribute with a default value.
CreateEntityReferencepublicCreates a new DOM Entity Reference for the specified name.
GetElementsByTagNamepublicGets a list of nodes with the specified tag name.
ImportNodepublicImports a copy of the DOM node into the current document.
CreateElementNSpublicCreates a new DOM Element with the specified Namespace URI.
CreateAttributeNSpublicCreates a new Attribute with the specified Namespace URI and qualified name.
GetElementsByTagNameNSpublicGets a list of nodes with the specified Namespace URI and local name.
GetElementByIdpublicGets the DOM Element with the specified ID attribute value.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
AddIDpublicAdds an ID Attribute value to a hash list used in the Document.

Fields

FIDListprotected
FRevisionprotected
FXML11protected
FImplementationprotected
FNamespacesprotected
FNamesprotected
FEmptyNodeprotected
FNodeListsprotected
FMaxPoolSizeprotected
FPoolsprotected
FDocumentURIprotected

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.