Provides an implementation of DOM interfaces.

laz2_dom.pas provides an Implementation of DOM (Document Object Model) interfaces. It is a modified copy of the FCL dom.pp unit (revision 15251) adapted to use UTF-8 instead of WideString by Mattias Gaertner.

Copyright (c) 1999-2000 by Sebastian Guenther, sg@freepascal.org
Modified in 2006 by Sergei Gorelkin, sergei_gorelkin@mail.ru

This unit provides classes which implement the interfaces defined in the DOM (Document Object Model) specification. The current state is:

- DOM Levels 1 and 2 - Completely implemented
- DOM Level 3 - Partially implemented

Specification used for this implementation:
Document Object Model (DOM) Level 2 Specification

Represents DOM exception code 1.
Index or size is negative, or greater than the allowed value.
Represents DOM exception code 2.
Specified range of text does not fit into a DOMString.
Represents DOM exception code 3.
Node is inserted somewhere it does not belong.
Represents DOM exception code 4.
Node is used in a different document than the one that created it (that does not support it).
Represents DOM exception code 5.
An invalid or illegal character is specified, such as in a name.
Represents DOM exception code 6.

Data is specified for a node which does not support data.

Represents DOM exception code 7.
An attempt was made to modify an object where modifications are not allowed.
Represents DOM exception code 8.

An attempt was made to reference a node in a context where it does not exist.

Represents DOM exception code 9.

Implementation does not support the type of object requested.

Represents DOM exception code 10.

An attempt was made to add an attribute that is already in use elsewhere.

Represents DOM exception code 11.

An attempt was made to use an object that is no longer usable.

Represents DOM exception code 12.

An invalid or illegal string was specified.

Represents DOM exception code 13.

An attempt was made to modify the type of the underlying object.

Represents DOM exception code 14.

An attempt was made to create or change an object in a way which is incorrect for the defined namespaces.

Represents DOM exception code 15.
Parameter or operation is not supported by the underlying object.
Represents the node type for DOM Elements.
Represents the node type for DOM Attributes.
Represents the node type for DOM Text nodes.
Represents the node type for DOM CDATA nodes.
Represents the node type for DOM Entity References.
Represents the node type for DOM Entities.
Represents the node type for DOM Processing Instructions.
Represents the node type for DOM Comments.
Represents the node type for DOM Document Elements.
Represents the node type for DOM Document Type Declarations (DTD).
Represents the node type for DOM Document Fragments.
Represents the node type for DOM Notation Declarations.
Defines a set with values using the Char type.
Type used for String values in DOM interfaces.
Type used for Pointers to Char values in DOM interfaces.
Type used for Char values in DOM interfaces.
Type used for Pointers to DOMString values.
Base class for exceptions raised in DOM interface classes.
Error code constant for the exception.
Constructor for the class instance.

Create is an overloaded variant of the constructor for the class instance. It allows an additional ASituation argument which describes the circumstance (or the class and method) where the Exception is raised. It calls the inherited constructor using the values in the ClassName property and the ASituation parameter as arguments.

This variant of the constructor is used in the implementation of methods of DOM classes like: TXMLDocument, TDOMDocument, TDOMImplementation, TDOMNamedNodeMap, TDOMNode, TDOMNode_NS, and TDOMElement.

Error code for the DOM exception.
Provides context information for the exception.
Exception raised for an invalid index size.

EDOMIndexSize is an EDOMError descendant which implements an exception raised when an invalid character position or offset is specified in TDOMCharacterData or TDOMText methods.

Constructor for the class instance.

Create is the constructor for the class instance. It calls the inherited method using the INDEX_SIZE_ERR constant and the ASituation parameter as arguments.

Provides context information for the exception.
Exception raised when an inserted node is not valid for the Document Object Model (DOM).

Used to ensure the pre-insert integrity of the hierarchical structure for the DOM node tree. Prevents violation of constraints for the Document Object Model (DOM).

Constructor for the class instance.

Create is the constructor for the class instance. It calls the inherited method using the HIERARCHY_REQUEST_ERR constant and the ASituation parameter as arguments.

Exception.Create
Provides context information for the exception.
Exception raised when a node is used in a document other than the one that created it.

Raised in methods like TDOMNode_WithChildren.InsertBefore and TDOMImplementation.CreateDocument.

Constructor for the class instance.

Create is the constructor for the class instance. It calls the inherited method using the WRONG_DOCUMENT_ERR constant and the ASituation parameter as arguments.

Provides context information for the exception.
Exception raised when a node is accessed in a context where it does not exist.

Raised in methods like:

- TDOMNode.DetachChild
- TDOMNode_WithChildren.InsertBefore
- TDOMNode_WithChildren.DetachChild
- TDOMNamedNodeMap.RemoveNamedItem
- TDOMNamedNodeMap.RemoveNamedItemNS
- TDOMElement.RemoveAttributeNode

Constructor for the class instance.
Provides context information for the exception.
Exception raised when the DOM implementation does not support the requested object type or operation.

Raised in methods like:

- TDOMNode.CloneNode
- TDOMDocument.CreateCDATASection
- TDOMDocument.CreateProcessingInstruction
- TDOMDocument.CreateEntityReference

Constructor for the class instance.

Calls the inherited method using the NOT_SUPPORTED_ERR error constant and the value in ASituation as arguments.

Provides context information for the exception.
Exception raised when adding an attribute that is already in use.
Not used in the current LazUtils implementation.
Constructor for the class instance.
Provides context information for the exception.
Exception raised when accessing an object that is no longer usable.
Not used in the current LazUtils implementation.
Constructor for the class instance.
Provides context information for the exception.
Exception raised when an invalid or illegal value is specified for a DOM object.
Not used in the current LazUtils implementation.
Constructor for the class instance.
Provides context information for the exception.
Exception raised when an attempt was made to modify the type for an object.
Not used in the current LazUtils implementation.
Constructor for the class instance.
Provides context information for the exception.
Exception raised when an object is changed in a way that is invalid for its Namespaces.

Raised in the TDOMNode_NS.SetPrefix method.

Constructor for the class instance.
Provides context information for the exception.
Exception raised when a parameter or operation is not supported by the object.
Not used in the current implementation.
Constructor for the class instance.
Provides context information for the exception.
Enumeration with flag values for DOM Nodes.
Node is read-only.
Node is recycled.
Node is a DOM Level 2-specific type.
Node contains ignorable whitespace only.
Node value was specified rather than implied.
Node is being destroyed.
Set type used to store TNodeFlagEnum values.

TNodeFlags is the type used to implement the Flags property in TDOMNode and descendants.

Implements an enumerator for DOM Nodes.

TDOMNodeEnumerator is a class used to implement an enumerator for DOM Nodes. The enumerator is created for a specified DOM node, and provides access to the top-level children for the DOM node. It does not descend any lower than the first child node and its sibling nodes in the DOM sub-tree.

Use the MoveNext method to select the next child node in the enumerator. Use the Current property to access the current DOM node for the enumerator.

Constructor for the class instance.
DOM node examined in the enumerator.
Gets the First child or the next Sibling as the Current value for the enumerator.
DOM node to use as the Current value for the enumerator.
Current DOM node for the enumerator.
Implements an enumerator that visits all Children in the sub-tree for a DOM node.

TDOMNodeAllChildEnumerator is a class used to implement an enumerator for a specified DOM node that visits all child nodes in its sub-tree. The enumerator uses the GetNextNode method in TDOMNode to get the value in the Current property. This means it will recursively descend into ChildNodes, and is halted when the next sibling for the specified DOM node is reached.

Use the MoveNext method to get the next DOM node for the enumerator. Use the Current property to access the currently selected DOM node.

Constructor for the class instance.
DOM node examined in the enumerator.
Gets the next DOM node for the enumerator.
DOM node used as the Current value for the enumerator.
Current DOM node selected in the enumerator.
Gets the enumerator class instance.
Enumerator class instance.
Implements the DOM Node interface.

TDOMNode is a class which implements the Node interface in the Document Object Model (DOM).

TDOMNode represents a single node in a DOM document. It includes NodeName, NodeValue, NodeType, and Attributes properties with information common to all nodes in a document tree. The ParentNode, ChildNodes, and OwnerDocument properties provide access to the tree structure for a DOM document.

TDOMNode implements the full DOM Level 2 specification, and provides partial support for the DOM Level 3 specification. It also provides extensions to the DOM Node interface that allow locating or cloning a node, perform name comparisons, or access its node flags.

TDOMNode is used as the ancestor for other specialized Node types, as specified in the DOM specification. These descendent classes may alter the base value and/or behavior as required for the specialized node type.

Gets the value for the NodeName property.

GetNodeName is an abstract virtual method DOMString function. It is used to get the value for the NodeName property. It is overridden in descendent classes to provide the name needed for the DOM node specialization.

Value for the NodeName property.
Gets the value for the NodeValue property.

GetNodeValue is a DOMString function used to get the value for the NodeValue property. It is overridden in descendent classes to provide the value needed for the DOM node specialization. In TDOMNode, the method always returns an empty string ('').

Value for the NodeValue property.
Sets the value for the NodeValue property.

SetNodeValue is a method used to set the NodeValue property to the value specified in AValue. It has an empty implementation in TDOMNode, and must be re-implemented in a descendent class to use the correct content for the DOM node specialization.

New value for the NodeValue property.
Gets the value for the FirstChild property.

GetFirstChild always returns Nil for the property value. TDOMNode does not allocate storage for child nodes. The method must be re-implemented in a descendent class to which implements a DOM node specialization with child nodes.

Value for the FirstChild property.
Gets the value for the LastChild property.
Value for the LastChild property.
Gets the value for the Attributes property.
Value for the Attributes property.
Gets the revision number for the node.

The value for the property is retrieved from the revision number in the OwnerDocument for the node instance.

GetRevision is called from methods in TDOMNodeList which compare the revision numbers for a given node and the node list where it is stored. When the revision numbers differ, the node list is refreshed by calling the BuildList method in the TDOMNodeList instance.

Revision number for the node.
Gets the value for the NodeType property.
Value for the NodeType property.
Gets the value for the TextContent property.

Returns the value from the NodeValue property in TDOMNode.

Value for the TextContent property.
Sets the value in the TextContent property.

Updates the value in NodeValue property in TDOMNode.

Value for the TextContent property.
Gets the value for the LocalName property.
Value for the LocalName property.
Gets the value for the NamespaceURI property.
Value for the NamespaceURI property.
Gets the value for the Prefix property.
Value for the Prefix property.
Sets the value for the Prefix property.
New value for the Prefix property.
Gets the value for the OwnerDocument property.
Value for the OwnerDocument property.
Gets the value for the BaseURI property.
Value for the BaseURI property.
Updates the read-only Node flag for the DOM Node and its children.
New value for the node flag.
Determines if the Node and its owner document can be modified.

Changing is a procedure used to determine if the DOM node and its Owner document can be modified. Changing uses the Node Flags in the DOM node and its OwnerDocument to determine if the Node is marked as read-only and the document is not being freed.

Raises an EDOMError with the DOM exception code NO_MODIFICATION_ALLOWED_ERR when the Node is marked as read-only.

Constructor for the class instance.

Create is the constructor for the class instance. Creates stores the TDOMDocument instance in AOwner as the OwnerDocument for the DOM node. Create calls the inherited constructor.

Document that is the Owner of the class instance.
Destructor for the class instance.

Destroy is the destructor for the class instance. Destroy ensures that the ParentNode is notified that the node will be removed from the tree structure. When ParentNode is assigned, its DetachChild method is called to remove the class instance from the ChildNodes hierarchy.

Destroy calls the inherited destructor prior to exiting from the method.

Performs actions needed to free the class instance.

FreeInstance is an overridden procedure used to perform actions needed when the class instance is freed. FreeInstance ensures that information in the internal TNodePool custom memory manager is updated, and the node is freed from its node pool. If the internal node pool has not been assigned, the inherited FreeInstance method is called.

TObject.FreeInstance
Gets the value for the ChildNodes property.

Calls the GetChildNodeList method in OwnerDocument to get the list of child nodes for the current class instance. The property value is an empty node list if there are no child nodes in the current node.

Value for the ChildNodes property.
Gets the number of Child nodes for the DOM node.

Always returns 0 (zero) in TDOMNode. Overridden in descendent classes (like TDOMNode_WithChildren).

Number of Child nodes for the DOM node.
Name for the DOM node.

NodeName is a read-only DOMString property that contains the name for the DOM node. The read access specifier for the property is an abstract method in TDOMNode, and must be implemented in descendent classes to return the correct value for the DOM node specializations.

The values for NodeName, NodeValue, and Attributes vary according to the node type as follows:

DOM Interface | NodeName | NodeValue | Attributes
TDOMAttr | Name of the attribute | Value of the attribute | N/A
TDOMCDATASection | #cdata-section | Content of the CDATA Section | N/A
TDOMComment | #comment | Content of the comment | N/A
TDOMDocument | #document | None | N/A
TDOMDocumentFragment | #document-fragment | None | N/A
TDOMDocumentType | Document type name | None | N/A
TDOMElement | Tag name | None | TDOMNamedNodeMap
TDOMEntity | Entity name | None | N/A
TDOMEntityReference | Name of the entity referenced | None | N/A
TDOMNotation | Notation name | None | N/A
TDOMProcessingInstruction | Target | Entire content excluding the target | N/A
TDOMText | #text | Content of the text node | N/A

Value for the DOM node.

NodeValue is a DOMString property that contains the value for the DOM node. Reading the value in NodeValue always results in an empty string ('') in TDOMNode, and writing the value for the property is not implemented. The access specifiers must be re-implemented in descendent classes to perform the actions required for the DOM node specializations.

The values for NodeName, NodeValue, and Attributes vary according to the node type as follows:

DOM Interface | NodeName | NodeValue | Attributes
TDOMAttr | Name of the attribute | Value of the attribute | N/A
TDOMCDATASection | #cdata-section | Content of the CDATA Section | N/A
TDOMComment | #comment | Content of the comment | N/A
TDOMDocument | #document | None | N/A
TDOMDocumentFragment | #document-fragment | None | N/A
TDOMDocumentType | Document type name | None | N/A
TDOMElement | Tag name | None | TDOMNamedNodeMap
TDOMEntity | Entity name | None | N/A
TDOMEntityReference | Name of the entity referenced | None | N/A
TDOMNotation | Notation name | None | N/A
TDOMProcessingInstruction | Target | Entire content excluding the target | N/A
TDOMText | #text | Content of the text node | N/A

Node type for the DOM Node.

NodeType is a read-only Integer property that represents the DOM node type as defined in the DOM specification. The read access specifier in TDOMNode is an abstract method, and must be implemented in a descendent class to return the correct value for the DOM node specializations.

DOM node specializations use the following values in the NodeType property:

DOM Interface | NodeType Constant | NodeType Value
TDOMElement | ELEMENT_NODE | 1
TDOMAttr | ATTRIBUTE_NODE | 2
TDOMText | TEXT_NODE | 3
TDOMCDATASection | CDATA_SECTION_NODE | 4
TDOMEntityReference | ENTITY_REFERENCE_NODE | 5
TDOMEntity | ENTITY_NODE | 6
TDOMProcessingInstruction | PROCESSING_INSTRUCTION_NODE | 7
TDOMComment | COMMENT_NODE name | 8
TDOMDocument | DOCUMENT_NODE | 9
TDOMDocumentType | DOCUMENT_TYPE_NODE | 10
TDOMDocumentFragment | DOCUMENT_FRAGMENT_NODE | 11
TDOMNotation | NOTATION_NODE | 12

DOM node that is the immediate ancestor of this node.

ParentNode is a read-only TDOMNode property that represents the DOM node that is the immediate ancestor of this node. All nodes, except TDOMAttr, TDOMDocument, TDOMDocumentFragment, TDOMEntity, and TDOMNotation may have a parent.

The value in ParentNode is assigned when TDOMNode methods like InsertBefore, InternalAppend, and AppendChild are called. The value in ParentNode is cleared when the DetachChild method is called, or when ChildNodes are freed.

Use ChildNodes to access the DOM nodes that are the immediate descendants of this node. Use PreviousSibling and NextSibling to access the respective DOM nodes that exist at the same Level in the DOM tree.

Gets the first child node for the current node.

FirstChild is a read-only TDOMNode property that represents the first child node for this DOM node. In TDOMNode, the value for the property is always Nil (not assigned). The read access specifier is re-implemented in a descendent class (TDOMNode_WithChildren) to provide direct support for child node access.

Gets the last child node for the current node.

LastChild is a read-only TDOMNode property that represents the last child node for this DOM node. In TDOMNode, the value for the property is always Nil (not assigned). The read access specifier is re-implemented in a descendent class (TDOMNode_WithChildren) to provide direct support for child node access.

Provides access to the list of Child nodes for the current node.

ChildNodes is a read-only TDOMNodeList property used to provide access to the child nodes for the current DOM node. Reading the value in ChildNodes causes a TDOMNodeList to be created using the DOM tree in OwnerDocument. The list contains any DOM nodes found in OwnerDocument immediately below the current DOM node. If there are no child nodes for the current node, the list has a Length (or Count - they contain the same data) of 0 (zero). Use HasChildNodes to determine if the ChildNodes property contains any DOM nodes.

While ChildNodes is specified in TDOMNode, actually support for the list of child nodes is implemented in the TDOMNode_WithChildren descendant.
Previous DOM Node at the same level in the DOM tree.

PreviousSibling is a read-only TDOMNode property that represents the previous DOM node at the same level in the DOM tree. If no previous node was found at the same level, the property is unassigned (contains Nil).

Use NextSibling to access the next node at the same level in the DOM tree.

Next DOM Node at the same level in the DOM tree.

NextSibling is a read-only TDOMNode property that represents the next DOM node at the same level in the DOM tree. If no successor node was found at the same level, the property is unassigned (contains Nil).

Use PreviousSibling to access the previous node at the same level in the DOM tree.

Contains Attribute for the DOM Node.

Attributes is a read-only TDOMNamedNodeMap property that contains attributes for the DOM node. Use the properties and methods in Attributes to access the DOM nodes by their name or ordinal position. Attributes also includes properties and methods that provide support for Namespace URIs and QualifiedNames as defined in the DOM specification.

While specified in TDOMNode, Attributes are valid only in the TDOMElement node type. For all other DOM node types the Attributes property is unassigned (contains Nil).

DOM Document that created the DOM node.

OwnerDocument is a read-only TDOMDocument property that represents the DOM document that created the node. OwnerDocument can be used to get access to the complete DOM tree for a document, or to access child nodes for any DOM node owned by the OwnerDocument.

In the TDOMDocument node specialization, the value in OwnerDocument is always unassigned (contains Nil).

Gets an enumerator for DOM Nodes that are top-level children in the node.

GetEnumerator is a TDOMNodeEnumerator function used to get an enumerator for all top-level child nodes for the DOM node. It does not include any grandchildren (recursive access to child nodes).

Enumerator for immediate child nodes in the DOM node.
Gets an enumerator for DOM Nodes that are children or grand children for the node.

GetEnumeratorAllChildren is a TDOMNodeAllChildEnumerator function used to get an enumerator for all nodes which are children or grandchildren for the node. Allows recursion into descendent nodes found in a child node.

Enumerator for all child nodes in the sub-tree for the DOM node.
Gets the next Child or Sibling node for the DOM node.

GetNextNode is a TDOMNode function used to get the next child or sibling node in the DOM node hierarchy. GetNextNode visits nodes starting at the FirstChild node for the class instance. If FirstChild is not assigned, the GetNextNodeSkipChildren method is called to get the NextSibling node, or the NextSibling node in the ParentNode.

The return value is the TDOMNode which represents the next child or sibling node in the document hierarchy.

GetNextNode is called from the TDOMNodeAllChildEnumerator.MoveNext method.

Next child or sibling node in the DOM hierarchy.
Gets the next sibling for the node in the DOM hierarchy.

GetNextNodeSkipChildren is a TDOMNode function used to get the next sibling node, ignoring all child nodes, for the current node.

The return value contains the TDOMNode that is the NextSibling for the current node, and can actually contain a previous sibling if NextSibling is unassigned. The return value is Nil when NextSibling is unassigned for both the current node and ParentNode.

GetNextNodeSkipChildren is used in the implementation of the TDOMNodeAllChildEnumerator.Create method, and called from the TDOMNode.GetNextNode method.

Next sibling node in the DOM hierarchy, or Nil.
Gets the previous node in the DOM node hierarchy.

GetPreviousNode is a TDOMNode function used to get the previous node in the DOM node hierarchy.

The return value contains the last node (or leaf) in the node hierarchy for the PreviousSibling node as return from the GetLastLeaf method for the node. The return value is the ParentNode when PreviousSibling is unassigned.

GetPreviousNode is the converse of the GetNextNode method.

Previous node in the DOM node hierarchy.
Gets the last node in the DOM sub-tree for the current node.

GetLastLeaf is a TDOMNode function used to the last node in the DOM node hierarchy for the current node.

The return value is Nil when LastChild has not been assigned for the current node. Otherwise, LastChild is called recursively until the given descendent node has no child nodes.

GetLastLeaf is used to implement the GetPreviousNode method.

Last node in the DOM sub-tree for the current node.
Gets the level in the DOM tree for the DOM node.

GetLevel is a SizeInt function used to get the level for the current node in the DOM node hierarchy. The return value is determined by counting the number of ParentNode assignments starting with the current DOM node. A root-level node in a DOM document is at level 0 (zero).

Number of parent nodes found in the DOM node hierarchy.
Inserts a new child node immediately before the reference child node.

InsertBefore is a TDOMNode function used to insert a new child node immediately before the referenced child node. In TDOMNode, InsertBefore always raises an EDOMHierarchyRequest exception. The method must be re-implemented in descendent classes which support child nodes in the DOM Node specialization.

Raises an EDOMHierarchyRequest exception; must be re-implemented in descendent classes.
DOM node inserted in the method.
New DOM node to insert into the child nodes.
Reference node where the new node is inserted.
Replaces a child node with the specified DOM node.

ReplaceChild is a TDOMNode function which specifies the method used to replace a child node in the DOM sub-tree with the specified DOM node. NewChild is the DOM node to store in the DOM sub-tree. OldChild is the existing DOM node replaced with the new node value.

While TDOMNode specifies the method, it does not provide physical storage for child nodes. As a result, ReplaceChild always raises an EDOMHierarchyRequest exception and the return value is always Nil. ReplaceChild must be re-implemented in a descendent class to provide the functionality required for other DOM node specializations.

Old child node replaced in the method.
New node to store in child nodes.
Old node to remove from the child nodes.
Detaches the specified child node from the DOM sub-tree for the node.

DetachChild is a TDOMNode function used to detach a specified child node from the DOM sub-tree for the current node. OldChild is the DOM node to remove from the DOM sub-tree. The return value contains the detached DOM node.

TDOMNode specifies the DetachChild method, but does not provide physical storage for child nodes. As a result, it always raises an EDOMNotFound exception in the method. DetachChild must be re-implemented in a descendent class as required for other DOM Node specializations.

The DOM Node detached in the method.
DOM Node to locate in the DOM sub-tree.
Removes the specified child from the DOM sub-tree for this node.

RemoveChild is a TDOMNode function used to remove the node specified in OldChild from the ChildNodes sub-tree. RemoveChild calls the DetachChild method to detach the specified node from the OwnerDocument. The return value is the node in OldChild after it has been detached from the OwnerDocument and its internal node references have been updated.

Child Node removed in the method.
DOM Node to locate in the DOM sub-tree.
Appends the specified node as a child in the current node.

AppendChild is a TDOMNode function used to append the node specified in NewChild as a child node in the hierarchy for the current class instance. AppendChild calls the InsertBefore method to make the specified node the first child node in the DOM hierarchy.

The return value contains the TDOMNode instance in NewChild after the node relationship in ParentNode, FirstChild, PreviousSibling, and NextSibling have been updated.

lnsertBefore always raises an EDOMHierarchyRequest exception in TDOMNode. It is overridden in descendent classes to perform actions needed for a DOM node specialization when the AppendChild method is called.
New DOM Node appended as a child node.
DOM Node to append in the method.
Indicates if the DOM node has child nodes.

HasChildNodes is a Boolean function which indicates if the DOM node has child nodes. In general, the return value is True when a DOM node has been assigned to the FirstChild property.

HasChildNodes always returns False in TDOMNode. TDOMNode does not allocate storage for child nodes. The method must be overridden in a descendent class which allocates storage for child nodes in the DOM node specialization.

True when the size of the ChildNodes list is not zero.
Makes a copy of the DOM node.

CloneNode is an overloaded TDOMNode function used to make a new copy of the current node. Deep indicates that child nodes are included in the new TDOMNode instance when set to True. An overloaded variant allows the DOM Document which owns the new node to be specified.

CloneNode always raises an EDOMNotSupported exception in TDOMNode, and the return value is always Nil. It must be overridden in a descendent class to perform any actions needed for the DOM node specialization.

DOM node created in the method.
Indicates if child nodes are included in the cloned node.
DOM Document used to created the new DOM Node.
Indicates if the DOM implementation supports a specific feature at a given conformance level.

IsSupported is a Boolean function which indicates whether the DOM implementation implements a specific feature and that feature is supported in this node. IsSupported implements the DOM Node method defined in the DOM Level 2 Specification.

Feature contains the name for the feature or module to check in the method.

Version contains the conformance level for the specified Feature. Both values are used as arguments to the TDOMImplementation.HasFeature method.

Returns True if the specified feature at the given conformance level is supported for the node, or false when not implemented.

True when the feature and version number are supported in the DOM implementation.
Name of the feature or module to check in the method.
Version number or conformance level required for the feature.
Indicates if the DOM node has attribute names and values.

HasAttributes is a Boolean function which indicates if the DOM node attribute names and/or values. HasAttributes implements the method defined for the DOM Node interface in the DOM Level 2 Specification.

The return value is True when a TDOMNamedNodeMap has been assigned for the node, and it has a non-zero value in its Length (or Count) property.

HasAttributes always returns False in TDOMNode, and is overridden in descendent classes which implement a DOM node specialization.
True when the Attribute list is not empty.
Normalizes text nodes and attributes in the Node sub-tree.

Normalize is a method used to convert child text nodes in the sub-tree to their normal form where only structure nodes separate the text nodes. Adjacent text nodes are combined into a single text node. Adjacent text nodes which contain only ignorable whitespace are consolidated into a single whitespace value.

Normalize implements the method defined for the DOM Node interface in the DOM Level 2 Specification.

URI for the NameSpace assigned to the DOM Node.

NamespaceURI is a read-only DOMString property with the Namespace URI (Universal Resource Identifier) for the DOM node, or an empty string when it has not been specified. NamespaceURI is determined using a namespace lookup for the value declared when the node is created.

For nodes other than node type ELEMENT_NODE (TDOMElement) and ATTRIBUTE_NODE (TDOMAttr), and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always an empty DOMString.

The property value is always an empty string ('') in TDOMNode. In a descendent class (like TDOMNode_NS), it will contain one of the Namespace URLs registered in the OwnerDocument for the node.

NamespaceURI implements the attribute from the Node interface in the DOM Level 2 Specification.

Name without the NameSpace prefix assigned to the DOM Node.

LocalName is a read-only DOMString property with the local part of the qualified name for the node. A qualified name consists of a delimited namespace Prefix and the name for the element or attribute in the node. Local name contains only the element or attribute name, without the Prefix for the namespace.

For the following Qualified Names:

- XML:ID
- XLink:href

The Prefix values are:

- XML
- XLink

The LocalName values are:

- ID
- href

For nodes other than ELEMENT_NODE (TDOMELement) and ATTRIBUTE_NODE (TDOMAttr), and nodes created with a DOM Level 1 method, such as createElement from the Document interface, the property value is is always an empty DOMString.

The property value is always an empty DOMString value in TDOMNode. In a descendent class (like TDOMNode_NS), it will contain the actual NodeName for an element or attribute.

Prefix used for the assigned NameSpace in the DOM Node.

Prefix is a DOMString property which contains the prefix part of a qualified name used for the node. Prefix is the identifier used for the namespace URI, and is included in the value for the NodeName property which includes the qualified name. When a qualified name is not used in NodeName, Prefix contains an empty DOMString value (''). Use LocalName for the value in NodeName without the value in Prefix.

Prefix applies to the DOM Element and Attribute node types. For nodes of any type other than ELEMENT_NODE (TDOMElement) and ATTRIBUTE_NODE (TDOMAttr) and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always an empty DOMString value.

Prefix implements the Prefix attribute for the DOM Node interface in the DOM Level 2 Specification.

Textual representation for the DOM Node.

TextContent is a DOMString property the textual content for a DOM node (and its specialized descendants), as specified in the DOM Level 3 specification.

In TDOMNode, the value in TextContent is redirected to the NodeValue property. The read and write access specifiers may be overridden in descendent classes to perform actions needed for a particular DOM Node specialization, including:

- TDOMProcessingInstruction
- TDOMCharacterData
- TDOMText
- TDOMAttr

Locates the Prefix for the specified NameSpace URI.

LookupPrefix is a DOMString function used to locate the Prefix associated with the NameSpace URI specified in the nsURI argument. LookupPrefix implements the DOM Node interface specified in the DOM Level 3 specification.

In TDOMNode, the return value is always an empty DOMString (''). Descendent classes which implement a specific DOM Node specialization (like TDOMElement) will provide an InternalLookupPrefix method used to get the return value. The internal GetAncestorElement routine is used to find Prefix / Namespace associations in ancestor nodes.

Prefix for the Namespace URI, or an empty string.
Namespace URI to locate in the Namespace information.
Locates the NameSpace URI for the specified Prefix.

LookupNamespaceURI is a DOMString function used to get the NamespaceURI associated with the Prefix specified in the APrefix argument. LookupNamespaceURI implements the method for the DOM Node interface as specified in the DOM Level 3 specification.

LookupNamespaceURI ensures that the DOM node uses the ELEMENT_NODE node type required for namespace support. If the node is not a DOM Element (TDOMElement), the ancestor nodes are checked for a TDOMDocument or TDOMAttrib node which can supply the namespace information.

LookupNamespaceURI compares the value in the Prefix property to the argument in APrefix. When a match is found, the NamespaceURI for the node is used as the return value. When a namespace is not found for the prefix, the return value is an empty DOMString ('').

This method is not fully compatible with the DOM Level 3 specification which allows the APrefix argument to contain a Null value. Lazarus cannot represent the DOMString type in that manner, so it uses an empty DOMString ('').
The Namespace URI for the specified Prefix, or an empty string.
Prefix to locate in the Namespace Information for the DOM Node.
Indicates if the specified NameSpace URI is the default namespace for the DOM node.

IsDefaultNamespace is a Boolean function which indicates if the Namespace URI in the nsURI argument is the default value for the DOM node.

True when the default Namespace is the specified Namespace URI.
Namespace URI to examine in the Namespace Information for the DOM Node.
Provides the BaseURI for the node relative to its Owner document.

BaseURI is a read-only DOMString property with the Base Universal Resource Identifier (URI) for the node relative to its context.

BaseURI is specified in the DOM Level 3 Specification. It is not defined in the DOM Level 2 APIs. The implementation in TDOMNode is incomplete as per the DOM Level 3 specification.

In the DOM specification, BaseURI is a dynamically computed value starting with the xml:base attribute for a given document. It includes the DocumentURI for the owner document, and should also include the node path to the current node.

In TDOMNode, BaseURI is resolved to the DocumentURI in the OwnerDocument when the node type is a document node or a processing instruction. It does not include the xml:base attribute that may (or may not ) be present in the owner document.

For all other node types, the property value is an empty string ('').

Finds the Child Node with the specified name.

FindNode is a TDOMNode function used to locate a child node in the class instance with the value in ANodeName in its NodeName property. The return value contains the TDOMNode instance with the specified name, or Nil if a node is not found with the specified name.

FindNode always returns Nil in TDOMNode since physical storage is not allocated in TDOMNode for child node instances. It must be overridden in a descendent class to performs actions needed for the DOM node specialization.

DOM Node located with the specified name.
Node Name to locate in the Child Nodes for the DOM Node.
Compares the NodeName in the DOM Node to the specified value.

CompareName is an Integer function used to compare the value in NodeName to the value specified in the name argument. NodeName and name are converted to DOMPChar types and passed as arguments an implementation routine used to compare the values.

The return value contains the difference between the ordinal character values for the first non-matching characters in the compared names. When the return value is 0 (zero), the compared values have the same content.

Difference between the ordinal character values for the first non-matching character in the compared names.
Value compared to the NodeName for the DOM node.
Provides access to the Node Flags for the DOM Node.

Flags is a TNodeFlags property which contains zero or more values from the TNodeFlagEnum enumeration that indicate the conformance level or state for the node. See TNodeFlagEnum for more information about the values in the enumeration and their meanings.

Values in Flags are used and updated in various methods like Normalize and GetTextContent. It is also updated when the SetReadOnly method is called.

Class type used to create TDOMNode instances.
Extends TDOMNode to allocate storage for child nodes.

TDOMNode_WithChildren is a TDOMNode descendant which allocates storage for child nodes in the class instance. TDOMNode_WithChildren is an extension to the Node interface in the DOM specification, and is designed to save memory in a large DOM tree.

Gets the value for the FirstChild property.

GetFirstChild is an overridden method in TDOMNode_WithChildren used to get the value for the FirstChild property.

DOM Node that is the first child node in the DOM sub-tree.
Gets the value for the LastChild property.

GetLastChild is an overridden method in TDOMNode_WithChildren used to get the value for the LastChild property.

Value for the LastChild property.
Makes a copy of child nodes in the specified DOM node.

CloneChildren is a method used to clone child nodes from the current class instance to DOM node specified in ACopy.

CloneChildren visits each of the child nodes, starting at FirstChild and continuing to the value in the NextSibling property for the child node. The CloneNode method for each child node is called make a new copy (including its children) that is owned by the document in ACloneOwner. The cloned node is added to ACopy using the InternalAppend method.

No actions are performed in the method when the FirstChild property has not been assigned in the class instance.

DOM Node which receives the cloned child nodes.
DOM Document used to create the cloned child nodes.
Frees all Child nodes for the DOM node.

FreeChildren is a method used to free all child nodes in the current class instance.

FreeChildren visits each of the child nodes, starting at FirstChild and continuing to the NextSibling for the child node. The TDOMNode instance that is the child is freed before continuing to the next sibling node.

FreeChildren sets the value in the FirstChild and LastChild properties to Nil prior to exit.

Gets the value for the TextContent property.

GetTextContent is an overridden method in TDOMNode_WithChildren used to get the value for the TextContent property. It re-implements the method to ensure that child nodes are represented in the value for the property.

Child nodes are processed, start at FirstChild and continuing to the NextSibling for the child node. The NodeType property for each child node is used to determine the actions needed for the node type. For example:

TEXT_NODE
  Casts the child node to TDOMText and appends its Data to the value for the property (when it is not ignorable whitespace).
COMMENT_NODE, PROCESSING_INSTRUCTION_NODE
  These child node types are omitted from the property value.
Other NodeTypes
  The TextContent property for the child node is appended to the property value.

Value for the TextContent property.
Sets the value for the TextContent property.

SetTextContent is a overridden method used to set the TextContent property to the value specified in AValue. TextContent is the textual representation of the content for the node as a single TDOMText child node.

SetTextContent calls the Changing method to ensure that the node does not have the value nfReadonly in its Flags property. An EDOMError exception is raised with the NO_MODIFICATION_ALLOWED_ERR constant if the node is marked as read-only.

SetTextContent removes existing ChildNodes by calling DetachChild until FirstChild is no longer assigned.

If AValue is not an empty string (''), the OwnerDocument is used to create a TDOMText node with the specified value. The new text node is added to ChildNodes using the AppendChild method.

New value for the TextContent property.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. It calls FreeChildren to free all of the ChildNodes for the class instance, and frees the node list as well. Destroy calls the inherited method prior to exit.

Inserts a new child node immediately before the reference child node.

InsertBefore is a TDOMNode function used to insert a new child node immediately before the reference child node. InsertBefore is an overridden function that re-implements the method defined in the ancestor class.

NewChild contains the Node inserted into the DOM sub-tree for the current DOM Node. RefChild contains the Node that establishes the position where the NewChild Node is inserted in the DOM sub-tree. When RefChild is not assigned (contains Nil), the new child node is appended as a sibling in the DOM sub-tree. No actions are performed in the method when NewChild and RefChild contains the same DOM node.

InsertBefore uses the value in the NodeType property for the NewChild node to determine the actions needed to add the node to the DOM sub-tree. NodeType determines if NewChild requires additional processing before it is added to the DOM sub-tree. Some DOM Node types cannot be added directly to the sub-tree. Only their child nodes are added. No actions are performed for these DOM Node specialization when they do not contain child nodes. InsertBefore raises an EDOMHierarchyRequest exception if ChildNode is not a valid child node type for the current DOM node.

InsertBefore updates the parent, sibling, and child relationships in DOM nodes as they are inserted (or appended) to the DOM sub-tree. The return value contains the NewChild argument with updated values in its ParentNode, PreviousSibling and NextSibling properties.

InsertBefore checks the ParentNode for the RefChild argument to ensure that it resides in the DOM sub-tree for the current DOM Node. An EDOMNotFound exception is raised when it has an assigned value other than the current DOM Node.

InsertBefore calls the Changing method to ensure that neither the current DOM Node nor its ancestor have their read-only Flags set. An exception is raised in Changing if Flags contains the value nfReadonly in either DOM Node.

When the NodeType is DOCUMENT_TYPE_NODE, the OwnerDocument property is examined. An EDOMWrongDocument exception is raised when the NewChild has an assigned value in the OwnerDocument property.

EDOMWrongDocument
  Raised when the OwnerDocument for the current node is not the same as the value in NewChild
EDOMNotFound
  Raised when the assigned ParentNode in RefChild is not the same as the current DOM node
EDOMHierarchyRequest
  Raised when NewChild is not a valid child node type for the current DOM node

DOM Node inserted into the DOM sub-tree.
Child node inserted in the method.
Reference child node where the new DOM node is inserted as a Sibling.
Replaces a child DOM node with another DOM node.
DOM node in OldChild after it has been detached from the node sub-tree.
New DOM node to store in the sub-tree.
Old DOM node replaced in the method.
Detached the specified DOM node from the sub-tree.
Returns OldChild after updating the Parent, children, and siblings for the node.
DOM node detached in the method.
Indicates if the current DOM node has child nodes.
True if FirstChild has been assigned for the node.
Gets the number of child nodes for the DOM node instance.

GetChildCount is an overridden SizeInt function in TDOMNode_WithChildren. It is used to get the number of child nodes for the class instance. No actions are performed in the method if FirstChild has not been assigned, and the return value is set to 0.

If a DOMNodeList has been assigned to ChildNodes, its Count property is used as the return value. If ChildNodes has not been assigned, the child nodes are visited (starting at FirstChild and proceeding to its NextSibling) to count the number of child nodes.

Number of child nodes in the DOM node.
Finds a DOM node with the specified value in its NodeName property.

FindNode is a method used to search the child nodes in class instance for the node with the name specified in ANodeName. The search is started using the node in FirstChild, and calls the CompareName method to compare the value in ANodeNode to the NodeName property for each child node.

The return value contains the first TDOMNode with a node name that matches the requested value. The return value is Nil if a node is not found that matches the requested value, or when the class instance does not have any child nodes.

DOM node with a name matching the requested value, or Nil.
Name for the DOM node to locate in the method.
Performs actions needed to append the specified node to the ChildNodes.

InternalAppend is a method used to perform actions needed to append the DOM node specified in NewChild to the child nodes for the class instance.

If the node has child nodes, as indicated by a value in FirstChild, PreviousSibling and NextSibling properties for the nodes are updated to reflect the new relationship in the node hierarchy.

If the node does not have any existing child nodes, the value in NewChild is assigned to the FirstChild property.

In both cases, NewChild is used as the LastChild for the class instance.

InternalAppend ensures that the ParentNode in NewChild is set to the current class instance.

InternalAppend is used in the implementation of the CloneChildren method.

New DOM Node appended to the DOM sub-tree.
Determines the Node types included in a DOM node list.

TFilterResult is an enumerated type with values that determine the nodes selected in a TDOMNodeList instance.

Do not accept any nodes
Accept all nodes and allow recursion.
Accept all nodes.
Accept all nodes but don't allow recursion.
Implements an ordered list of DOM Nodes.

TDOMNodeList is a class used to Implement an ordered list of DOM nodes, as required in the DOM specification. TDOMNodeList provides internal storage for TDOMNode instances that are children of a specified DOM node. DOM nodes stored in TDOMNodeList are "live"; changes made to a DOM node in the list are automatically propagated to the DOM Document tree.

Gets the value for the Count and Length properties.

GetCount is a LongWord function used to the get value for the Count and Length properties. Calls the BuildList method to refresh the nodes in the list when the revision number for the list does not match the revision number for the node which owns the list.

The property value contains the Count for the internal TFPList instance used to store the TDOMNode instances.

Gets the value for the Item property.

GetItem is a TDOMNode function used to get the value for the indexed Item property. Index contains the ordinal position in the list for the property value.

GetItem ensures that items in the internal TFPList instance are up-to-date. When the revision number for the list differs from the revision number for the node that owns the list, the BuildList method is called to refresh its contents and apply the node filtering mechanism for the container.

The return value contains the TDOMNode instance at the specified position in the list. The return value is Nil when Index contains a value not present in the internal list.

Value for the Item property.
Ordinal position for the DOM node in the property value.
Determines if the node can be used in the DOM node list.

NodeFilter is a TFilterResult function used to determine if the DOM node specified in ANode can be included in the DOM Node list. The return value indicates whether the node is allowed, and also whether its child nodes can be examined as well.

NodeFilter always returns frNoRecurseTrue in TDOMNodeList, and allows the node but does not allow recursion into its child nodes. The method is overridden in descendent classes to perform the actions needed for the DOM node specialization.

Indicates if the node is included in the node list.
DOM Node to examine in the method.
Fills the node list using the node filter.

BuildList is a virtual method used to get the TDOMNode instances in the node list. BuildList is called when the revision numbers for the node list and the node which owns the node list have different values. This ensures that the node list always reflects the current content in the DOM node hierarchy.

BuildList clears the internal TFPList instance where the DOM nodes are stored, and updates the internal revision number for the node list to match the value in the owner node. Child nodes for the owner node are visited, and the NodeFilter method is called to determine if the child node should be included in the node list. If the return value from NodeFilter indicates that recursion is allowed, the child nodes for each child node are also visited and examined.

BuildList is marked as deprecated in TDOMNode. Use NodeFilter instead.
Constructor for the class instance.

Create is the constructor for the class instance, and calls the inherited method on entry.

Create stores the DOM node in ANode as the owner for the node list, and "touches" the internal revision number for the list so that it is refreshed on its next access. Create also allocates the internal TFPList instance used to store the nodes in the node list.

DOM Node which provides the child nodes for the list.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. It ensures that the internal list storage is set to Nil before the class instance is freed. Destroy calls the inherited method prior to exit.

Provides indexed access to DOM nodes in the list.

Item is a read-only indexed TDOMNode property used to provide access to DOM nodes in the list by their ordinal position. Item is the default property for the class instance.

Index contains the ordinal position for the requested TDOMNode instance, and should be in the range 0..Count-1. The property value is Nil if Index contains a value which is not a valid position in the list.

Use Count (or Length) to get the number of DOM nodes available in the list.

Ordinal position for the requested DOM Node in the list.
Number of DOM nodes stored in the list.

Count is a read-only LongWord property with the number of TDOMNode instances available in the Item property. Reading the value for the property causes the BuildList method to be called when the internal revision number for the list differs from the value in the DOM node that owns the list. The property value is re-directed to the Count property for the internal TFPList instance in the class.

Count and Length are synonymous. Count is the property name used in FPC / Lazarus classes. Length is the term used in the specification for the DOM interface. Both are provided for completeness.

Number of DOM Nodes stored in the list.

Count and Length are synonymous. Count is the property name used in FPC / Lazarus classes. Length is the term used in the specification for the DOM interface. Both are provided for completeness.

Provides a recursive list of DOM Elements.

TDOMElementList is a TDOMNodeList descendant that provides an extension to the DOM interface used to build recursive lists of elements. TDOMElementList provides optional filtering used to select the DOM Elements that appear in the list.

Member with the value for the filter applied to the list.
Member with the index of the NameSpace for the filter.
Member with the local name used to filter nodes in the list.
Indicates if filtering is used when selecting DOM Elements in the list.

UseFilter is a Boolean member used to indicate whether filtering is enabled to select the elements in the list. The value is set in the Create method, and contains True when the filter or local name argument has a value other than '*' (All elements). UseFilter is used in NodeFilter to determine the TFilterResult return value from the method.

Determines if the node can be used in the DOM element list.

NodeFilter is an overridden TFilterResult function used to determine if the DOM node specified in ANode can be included in the DOM Element list. The return value indicates whether the node is allowed in the element list.

NodeFilter re-implements the method defined in the ancestor class to check whether the DOM Node in ANode has ELEMENT_NODE in its NodeType property.

If the Element list was created with a Namespace URI argument, the Namespace Information for the list is used to get the return value. It is set to True when the LocalName for the node matches the qualified name in the Namespace Information.

If the Element list was created using a tag name as a filter, the return value is True when the TagName property in the node contains the same value. It is also True when the filter value was set to '*' for any element.

The return value is always False if the specified node is not a DOM Element.

NodeFilter is called from the inherited BuildList method.

True if the specified node matches the tag name filter for the list.
DOM Node to include or exclude using the Filter value.
Constructor for the class instance.

Create is the overloaded constructor for the class instance. The overloaded variants allow either a filter value, or a namespace URI and and a local name to be used to filter the nodes in the class instance.

Create updates the values in the Filter, LocalNameFilter, and UseFilter members based on the overloaded variant called to create the class instance.

DOM Node with children for the list.
Filter to apply to values in the list.
NamedSpace URI for values in the list.
LocalName for values in the list.
Implements the NamedNodeMap interface in the DOM specification.

TDOMNamedNodeMap is a class used to implement the NamedNodeMap interface in the DOM specification.TDOMNamedNodeMap is used as a collection of DOM Nodes that are accessed by their name or their ordinal position. TDOMNamedNodeMap provides support for the Namespace URIs and QualifiedNames in the collection, as required for DOM Level 2 conformance.

The DOM specification mandates unordered access to nodes in the collection. The sorting options available in TDOMNamedNodeMap are an extension to the DOM specification. To achieve this, the class uses two separate internal lists to represent the nodes in their sorted and unsorted orders. This most certainly requires additional memory and processing, but the overhead is minimal in comparison to the derived benefit.

TDOMNamedNodeMap is the type used to represent Attributes, Entities, and Notations in the DOM API. The TAttributeMap implementation class is used for namespace-enabled node maps.

Gets the value for the Item property.
Value for the Item property.
Ordinal position for the Item.
Gets the value for the indexed SortedItem property.
Value for the SortedItem property.
Ordinal position for the node in the sorted item list.
Gets the value for the Length property.

Ensures that the internal TFPList instance has been allocated for the positional list. The return value is 0 (zero) when the list has not been allocated.

Value for the Length property.
Finds a DOM Node with the specified name in the sorted container.

Name is a DOMString value with the name for the DOM node to locate in the SortedItem container.

Index is an output parameter where the ordinal position in the sorted list is stored. The value is 0 (zero) if a DOM node with the specified name is not found in the sorted container.

The return value is True when a TDOMNode instance is located with the specified name. The return value is False if a DOM node with the specified name is not found in the sorted container.

Calls the CompareName method for each TDOMNode instance to compare the value in name to the NodeName property for the node.

True if a node with the specified name is found in the sorted list.
Name to locate in the sorted list.
Ordinal position for the node in the sorted list.
Deletes the DOM node at the specified position in the sorted list of nodes.

DeleteSorted is a TDOMNode function used to delete the node at the position specified in Index from the sorted list of nodes.

The return value contains the TDOMNode instance deleted in the method. The node is also removed from the positional list used for the Item property.

When node type indicates that the node is an Attribute node, the OwnerElement in the return value is set to Nil.

DeleteSorted is called from the InternalRemove method.

DOM node instance deleted in the method.
Ordinal position for the node removed from the sorted node list.
Restores the default value for the attribute node with the specified name.

RestoreDefault is a method used to restore the default value for the attribute with the name specified in the name argument.

RestoreDefault ensures the Node type for the map is set to ATTRIBUTE_NODE. No actions performed in the method if the Node type for the map is not set to Attribute nodes. In addition, no actions are performed when the owner node does not have namespace information with the default value for the specified attribute name.

RestoreDefault calls the GetAttributeNode method in the owner Element to retrieve the attribute with the specified name. When assigned, and the attribute default value is "fixed" or "specified", it is re-applied to the attribute.

Name of the item updated in the method.
Performs actions need to remove an attribute node with the specified name.

Calls the FindSorted method to locate the DOM node with the specified name. The return value is the TDOMNode instance removed in the method after the OwnerElement for the attribute has be cleared. The return value is Nil if node with the specified name is not found in the node map.

DOM node for the attribute removed in the method, or Nil when not found.
Name of the attribute node affected in the method.
Performs actions to determine if an inserted attribute node is valid for its context.

ValidateInsert is an Integer function used to determine if the DOM node in arg is valid for the context where it is used. The return value represents a specific error condition when set to a non-zero value.

For example:

NO_MODIFICATION_ALLOWED_ERR
  nfReadOnly is included in the Flags for the owner node.
WRONG_DOCUMENT_ERR
  The node in arg has a different owner document than the node which owns the map.
HIERARCHY_REQUEST_ERR
  The node in arg has a different node type than the node type for the map.
INUSE_ATTRIBUTE_ERR
  The map is for Attribute nodes and the owner Element in arg does not match the owner Element for the map.

ValidateInsert is called from the TDOMNamedNodeMap.SetNamedItem method.

Numeric value reflecting an error condition, or 0 when valid.
DOM node examined in the method.
Constructor for the class instance.

Create is the overridden constructor for the class instance, and calls the inherited method on entry. Create stores values passed in the AOwner and ANodeType arguments to members in the class instance.

AOwner is the DOM node which owns the entities, notations, or attributes maintained in the node map.

NodeType is the Integer value that indicates the value for the TDOMNode instances stored in the node map. NodeType should contain one of the values: ENTITY_NODE, NOTATION_NODE, or ATTRIBUTE_NODE. It is not validated in the constructor.

Owner of the class instance.
DOM Node type for the entries in the map.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. It ensures that DOM nodes in internal TFPList instances in the class are freed. It also frees the TFPList class instances. Destroy calls the inherited destructor prior to exiting from the method.

TFPList
Gets the item with the specified name.

Calls FindSorted to locate the node with the specified name. The return value is Nil if a node with the specified name is not found in the SortedItem property for the map.

Item with the specified name, or Nil when not found.
Name to locate in the Items for the map.
Sets the value for a named item to the specified node.

SetNamedItem is a TDOMNode function used to store the named node in arg in the node map. This may require inserting a new entry or updating an existing one.

SetNamedItem calls ValidateInsert to determine whether the node is valid, and the parent for the node map is updatable. If the response code contains a non-zero value, an EDOMError exception is raised with the response code as the error constant.

SetNamedItem calls the FindSorted method to get the ordinal position for the node in arg. If a node with the same name already exists, it is replaced. Otherwise, the node is inserted at the position needed in the sorted node list.

The node type, passed as an argument to the constructor, is used to determine whether additional actions are needed to update the node / node map. For attribute nodes (TDomAttr), the OwnerElement is cleared in the old node (when needed). The OwnerElement in the new node is set to the DOM element which owns the attribute.

The return value is set to Nil if the node in arg was added to the map. Otherwise, the return value contains the node which was replaced.

SetNamedItem is called from methods like SetAttributeNode and SetAttributeNodeNS in TDOMElement.

Use GetNamedItem to retrieve a node from the map with a specified name.

Node replaced in the named node map, or Nil when the node was added.
Node with the name and value added/updated in the method.
Removes the node with the specified name.

RemoveNamedItem is a TDOMNode function used to remove the node with the name specified in the name argument. RemoveNamedItem calls the InternalRemove method to locate and remove the node from the map, and possibly restore the default value for a DOM Attribute node.

The return value contains the DOM node removed from the SortedItem property.

EDOMError
  Raised with the error constant NO_MODIFICATION_ALLOWED_ERR when the Owner is marked as read-only.
EDOMNotFound
  Raised if a node with the specified name is not found in the node map.

The DOM node removed in the method.
Name for the DOM node removed in the method.
Gets the Item with the specified Namespace URI and local name.
Namespaced node located in the method.
Namespace URI for the namespaced node.
Local name for the namespaced node.
Sets a namespaced node to the specified value.
Namespaced node replaced in the node map, or Nil when the node was added.
Node with the namespace URI, local name, and value added/updated in the method.
Remove a DOM Node with the specified Namespace URI and local name.
Always Nil in TDOMNamedNodeMap.
Namespace URI for the item removed in the method.
Local name for the item removed in the method.
Provides indexed access to the unsorted DOM Nodes in the container.
Ordinal position for the DOM Node.
Provides indexed access to the sorted DOM Nodes in the container.
Ordinal position for the DOM Node.
Indicates the Length of the container.
Implements the CharacterData interface from the DOM specification.

TDOMCharacterData is a TDOMNode descendant that implements the CharacterData interface from the DOM specification. TDOMCharacterData provides properties and methods used to access and manipulate character data in the DOM APIs.

Methods which alter character data use 0-based offsets; the offset values are converted internally to the 1-based offsets used in FPC / Lazarus.

TDOMCharacterData is the ancestor class for other DOM Node specializations like TDOMText and TDOMComment. TDOMCharacterData is not used directly. Use one of the descendent classes.

Use TDOMCDATASection for the CDATA interface defined in the DOM specification.

Gets the value for the Length property.

The property value is the length of the content in the NodeValue property.

Value for the Length property.
Gets the value for the NodeValue property.
Value for the NodeValue property.
Sets the value for the NodeValue property.

SetNodeValue is an overridden method in TDOMCharacterData used to set the value for the NodeValue property.

SetNodeValue calls the Changing method to ensure that the node does not have the read-only attribute in its Flags property, or the OwnerDocument is not being freed. Either situation causes an EDOMError exception to raised.

SetNodeValue sets the internal member for the property to the specified value.

Raises an EDOMError exception if the node is marked as read-only, or the OwnerDocument for the node is being destroyed.
Value for the NodeValue property.
Provides access to the character data in the NodeValue property.

Data is a DOMString property with the character data for the class instance. Setting a new value for the property causes the SetNodeValue method to be called.

Length of the character data for the class instance.

Length is a read-only LongWord property with the length of the character data in the class instance. The property value contains the length for the content in the NodeValue property.

Copies character data at the specified offset for the number of bytes requested.
Byte values copied from the NodeValue.
Offset to start copying character data.
Number of bytes to copy from the character data.
Appends the specified value to the end of the character data.
Value to append to the character data.
Inserts the specified value at the given offset in the character data.
Offset in the character data where the value is inserted.
Value inserted into the character data.
Deletes a given number of characters at the specified offset in the character data.
Offset in the character data where values are deleted.
Number of characters to delete from the character data.
Replaces the characters at the specified offset in the character data.
Offset where characters are replace in the character data.
Number of characters to remove from the character data.
Characters to insert into the character data at the specified offset.
Implements the DOMImplementation interface from the DOM specification.

TDOMImplementation is a class which implements the DOMImplementation interface from the DOM specification. TDOMImplementation provides methods which perform operations that do not require an existing TDOMDocument class instance, such as creating new TDOMDocumentType or TDOMDocument instances. TDOMImplementation implements the HasFeature method which determines if the DOM implementation supports specific features required to conform to a specific DOM level.

Indicates if a feature or module is supported in the DOM implementation.

HasFeature is a Boolean function which implements the method from the DOMImplementation interface in the DOM Level 2 specification. HasFeature indicates if a feature or module is supported at the specified conformance level for the DOM implementation.

feature contains the name for the feature or module examined in the method.

version is the version number or conformance level needed for the feature.

HasFeature recognizes the following feature names and version numbers in TDOMImplementation:

'CORE'
  Version numbers '2.0' or '' (empty string)
'XML'
  Version numbers '1.0', '2.0', or '' (empty string)

The return value is True if the specified feature is supported at the requested version number.

True when the requested feature is supported at the required version.
Feature or module name to examine in the method.
Version number or support level required for the feature.
Creates a DOM Document Type using the specified arguments.

CreateDocumentType is a method used to create an instance of a DOM Document Type. CreateDocumentType implements the method specified for the DOMImplementation interface in the DOM Level 2 specification.

Create ensures that the value in the QualifiedName argument is a valid XML Name, including its use of 'xml' or 'xmlns' prefixes in the name token. If QualifiedName is not valid, an EDOMError exception is raised.

CreateDocumentType returns a TDOMDocumentType instance with the values from the QualifiedName, PublicID, and SystemID parameters assigned to its Name, PublicID, and SystemID properties.

Use CreateDocumentType to create the optional DTD instance passed as an argument to the CreateDocument method, and assigned as the DocType property in the new Document.

Raises an EDOMError exception if an invalid value is specified in the QualifiedName argument.
IsXmlName
TDOMDocumentType created in the method.
Qualified name used in the DOM Document type.
Public ID for the DOM Document type.
System ID for the DOM Document type.
Creates a new DOM Document instance.

CreateDocument is a TDOMDocument function used to create a new DOM Document instance.

CreateDocument implements the method defined for the DOMImplementation interface in the DOM Level 2 specification. It creates a TXMLDocument instance that is used as the return value for the method.

The NamespaceURI and QualifiedName arguments provide the namespace, prefix, and tag name used for the root Element in the document instance.

doctype contains the optional TDOMDocumentType instance (or DTD) for the new document. When doctype is assigned, its OwnerDocument property is set to the new document instance created in the method.

CreateDocument raises EDOMError exceptions for the following:

INVALID_CHARACTER_ERR
  Raised if QualifiedName contains an illegal character for an XML Name token.
NAMESPACE_ERR
  Raised if QualifiedName is malformed, has a prefix and the namespaceURI is missing, or when the prefix that is "xml" does not match the value in stduri_xml.
WRONG_DOCUMENT_ERR
  Raised if doctype has already been used with a different document or was created from a different implementation.

XML document created in the method.
NameSpace URI for the root element in the XML document.
QualifiedName for the root element in the XML document.
Document type appended to the XML document when assigned.
Implements the DocumentFragment interface from the DOM specification.

TDOMDocumentFragment is a TDOMNode_WithChildren descendant that implements the DocumentFragment interface from the DOM Level 2 specification. TDOMDocumentFragment is a "lightweight" or "minimal" Document object. It is often used as a temporary work area before applying changes to a TDOMDocument instance. Its content does not have to represent a well-formed XML document, but does require its child nodes to be well-formed XML parsed entities.

Gets the value for the NodeType property.

Returns DOCUMENT_FRAGMENT_NODE in TDOMDocumentFragment.

Value for the NodeType property.
Gets the value for the NodeName property.

Returns a String with the value '#document-fragment' in TDOMDocumentFragment.

Value for the NodeName property.
Creates a copy of the document fragment with optional recursion into child nodes.

CloneNode is a method used to create a document fragment with the content specified in ACloneOwner, the OwnerDocument for the clone. CloneNode implements the method defined for the Node interface in the DOM Level 2 specification.

CloneNode creates a new TDOMNode instance that is a duplicate of the document fragment node by calling the CreateDocumentFragment method in ACloneOwner. This causes ACloneOwner to be assigned as the OwnerDocument for the new node. The new node does not have a ParentNode.

The deep argument indicates if the child nodes in ACloneOwner are also duplicated in the method. When deep is True, the CloneChildren method is called to duplicate the child nodes (recursively). Cloning a DOM Element node using deep recursion also copies its attribute names and values. Set deep to False to limit the copy to the immediate node and its Attributes.

The return value contains a TDOMNode instance with the duplicated content for the node in ACloneOwner.

The new copy of the document fragment.
Indicates if child nodes are included in the cloned document fragment.
Document used as the owner of the cloned document fragment.
Type used for namespaces in a DOM Document.

TNamespaces is an array of DOMString type used to represent namespace values in a DOM Document. TNamespaces is the type used to implement the internal Namespaces member in TDOMDocument.

Implements the DOM Document interface.

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.

Gets the value for the DocumentElement property.

The return value is the first child node in the document which is a DOM Element node (NodeType is ELEMENT_NODE). Starts at FirstChild and continues to NextSibling until a match is found. The node is cast to the TDOMElement type used for the property value.

Value for the DocumentElement property.
Gets the value for the DocType property.

The return value is the first child node in the document which has DOCUMENT_TYPE_NODE in its NodeType property. Starts at FirstChild and continues to NextSibling until a match is found. The node is cast to the TDOMDocumentType type used for the property value.

Value for the DocType property.
Gets the value for the NodeType property.

GetNodeType is an overridden method in TDOMDocument used to get the value for the NodeType property. It ensures that the property value is DOCUMENT_NODE for the TDOMDocument instance.

Value for the NodeType property.
Gets the value for the NodeName property.

GetNodeName is an overridden method in TDOMDocument used to get the value for the NodeName property. It ensures that the property value is '#document' in the TDOMDocument instance.

Value for the NodeName property.
Gets the value for the TextContent property.

GetTextContent is an overridden method in TDOMDocument used to the value for the TextContent property. GetTextContent always returns an empty string ('') in TDOMDocument.

Value for the TextContent property.
Gets the value for the OwnerDocument property.
Value for the OwnerDocument property.
Sets the value for the TextContent property.

SetTextContent is ignored in TDOMDocument; the implementation is empty.

New value for the TextContent property; ignored in TDOMDocument.
Removes a DOM element from the hash table used for IDs in the document.

RemoveID is a method used to remove the DOM Element specified in Elem from the internal has table used for identifiers in the document. Calls the RemoveData method for the THashTable member in the class instance.

RemoveID is called when a TDOMElement instance is freed.

THashTable.RemoveData
DOM Element to remove from the hash list for the document.
Gets a DOM Node List with the children for the specified DOM Node.

GetChildNodeList is a TDOMNodeList function used to get a list with the child nodes in ANode.

If ANode is not a TDOMNode_WithChildren descendant, the return value is an empty TDOMNodeList instance with ANode as its parent. Otherwise, the value in the ChildNodes property in ANode is used as the return value.

TDOMNodeList instance for the specified DOM node.
DOM Node examined for child nodes in the method.
Gets a DOM Element List with elements found in the specified DOM Node.
Element list generated in the method.
DOM Node examined in the method.
Namespace URI for elements included in the list.
LocalName for elements included in the list.
Indicates if Namespaces are used when selecting elements in the list.
Signals that the specified list can be removed from the internal hash table.

NodeListDestroyed is a method called when the TDOMNodeList instance in AList is freed.

Values in the Flags property are checked to determine whether the TDocument instance is being freed, or just the specified list. The RemoveData method in the internal THashTable member is called for the list in AList. No actions are performed in the method when the TDocument instance and its node lists are freed.

THashTable.RemoveData
Node list generating the notification.
Ensures the DOM node class type is allocated using the Node pool for the document.

Alloc is called when new DOM node specializations are created and added to the DOM node hierarchy. It is called from methods like:

In TDOMElement:
  CloneNode, SetAttributeNS
In TDOMNotation:
  CloneNode
In TDOMEntity:
  CloneNode
In TDOMDocument:
  CreateElement, CreateElementBuf, CreateDocumentFragment, CreateTextNode, CreateTextNodeBuf, CreateComment, CreateCommentBuf, CreateAttribute, CreateAttributeBuf, CreateAttributeNS, CreateElementNS, CreateCDATASection
In TXMLDocument:
  CreateProcessingInstruction, CreateEntityReference

DOM Node created using the class reference.
DOM Node class to instantiate in the method.
Gets the ordinal position for the specified namespace URI in the document namespaces.
Ordinal position for the Namespace URI, or -1 when not found.
Namespace URI to locate in the document.
Indicates if the Namespace URI is added if it does not already exist.
Inserts a DOM Node prior to the reference DOM node.

InsertBefore is an overridden method in TDOMDocument used to insert the DOM node specified in NewChild immediately before the node specified in RefChild.

InsertBefore checks the NodeType property in NewChild to ensure that the operation is valid for the node type. An EDOMHierarchyRequest exception is raised for either of the following conditions:

- NewChild is a DOM Element node and the DocumentElement has already been assigned.
- NewChild is a DOM DocumentType node and the DocType property has already been assigned.

InsertBefore calls the inherited method using NewChild and RefChild as arguments.

DOM Node inserted in the method.
New DOM Node to include in the document.
Reference DOM Node that determines the location for the new DOM node.
Replaces a child node with another DOM node.

ReplaceChild is an overridden TDOMNode function used to replace the DOM node in OldChild with the DOM node in NewChild.

ReplaceChild ensures that the DocumentElement can be replaced with the specified element node or DTD node in NewChild. When NewNode is not an element or DTD node, the inherited ReplaceChild method is called.

The return value is the TDOMNode instance in OldChild after it has been detached from the document.

TDOMNode instance detached from the document.
New DOM node to include in the document.
DOM Node replaced with the new DOM node.
Document Type declaration used in the document.

DocType is a read-only TDOMDocumentType property that represents the Document Type declaration found in the child nodes for the document. DocType examines the top-level child nodes to find the first node with the value DOCUMENT_TYPE_NODE in its NodeType property.

Provides access to the DOM Implementation for the document.

Impl is a read-only TDOMImplementation property that provides access to the DOM Implementation for the document.

Gets the root element for the document.

DocumentElement is a read-only TDOMElement property that represents the root element for the document. DocumentElement is derived using the top-level child nodes found in the document. The return value contains the first DOM Node located that contains the value ELEMENT_NODE in its NodeType property.

Creates an element in the document with the specified tag name.

CreateElement is a TDOMElement function used to create a new DOM Element with the tag name specified in tagName.

CreateElement calls Alloc to create the DOM Element in the internal node pool for the document. The value in tagName is checked for a QualifiedName matching a Namespace registered in the document, and added to the Namespace index if it does not already exist. CreateElement calls the AttachDefaultAttrs method in TDOMElement to add default attribute values required for the DOM Element.

Raises an EDOMError exception with the exception code INVALID_CHARACTER_ERR if tagName does not contain a valid XML name.

DOM Element created in the method.
Tag name used in the new DOM Element.
Creates an element in the document with the specified tag name.

CreateElementBuf is a TDOMElement function used to create a new DOM Element with the tag name specified in the Buf argument. Buf is a DOMPChar type that contains a pointer the character data for the tagName.

CreateElementBuf calls Alloc to create the DOM Element in the internal node pool for the document. The value in Buf is checked for a qualified name matching a Namespace registered in the document, and added to the Namespace index if it does not already exist.

DOM Element created in the method.
Pointer to character data used as the tag name for the Element.
Length of the values in Buf.
Creates a new DOM Document Fragment.

CreateDocumentFragment is a TDOMDocumentFragment function used to create an empty DOM Document Fragment. CreateDocumentFragment calls the Alloc method to enable memory management for the TDOMDocumentFragment class instance.

DOM Document Fragment created in the method.
Creates a new DOM Text node with the specified value.

CreateTextNode is a TDOMText function used to create a DOM Text node with the specified value. Data contains the value assigned to the NodeValue property in the TDOMText class instance. CreateTextNode calls the Alloc method to enable memory management for the new TDOMText class instance.

DOM Text node created in the method.
Value assigned to the new DOM Text node.
Creates a new DOM Text node with the specified value.
DOM Text node created in the method.
Pointer to the character data assigned to the new DOM Text node.
Length of the buffer.
Indicates if whitespace in the buffer is ignored.
Creates a new DOM Comment with the specified content.
DOM Comment created in the method.
Values used as the content for the DOM Comment.
Created a new DOM Comment using the specified content.
DOM Comment created in the method.
Pointer to character data used as the content for the comment.
Length of the buffer.
Creates a new DOM CDATA section with the specified content.
DOM CDATA Section created in the method.
Values used as the content for the CDATA section.
Creates a new DOM Processing Instruction.
DOM Processing Instruction created in the method.
Target for the Processing Instruction.
Content for the Processing Instruction.
Creates a new DOM Attribute with the specified name.
DOM Attribute node created in the method.
Name assigned to the DOM Attribute node.
Creates a new DOM Attribute with the specified name.
DOM Attribute node created in the method.
Pointer to character data with the name for the Attribute.
Length of the buffer.
Creates a new Attribute with a default value.
DOM Attribute created in the method.
Pointer to character data using as the Attribute name.
Length of the buffer.
Creates a new DOM Entity Reference for the specified name.
CreateEntityReference always raises an EDOMNotSupported exception. DOM Entity References are not supported in this DOM Implementation. Entity References in an existing document should have been converted to DOM Entities when the document was de-serialized.
DOM Entity Reference created in the method.
Name for the DOM Entity Reference.
Gets a list of nodes with the specified tag name.
Node list created in the method.
Tag name to locate in the DOM nodes for the document.
Imports a copy of the DOM node into the current document.
DOM node created in the method.
Node with values to import in the method.
Indicates if the entire DOM sub-tree is included in the process.
Creates a new DOM Element with the specified Namespace URI.
DOM Element created in the method.
Namespace URI for the qualified name.
Namespace Prefix and Local Name used as the tag name for the Element.
Creates a new Attribute with the specified Namespace URI and qualified name.
DOM Attribute node created in the method.
Namespace URI for the qualified name.
Namespace Prefix and Local Name used as the name for the Attribute.
Gets a list of nodes with the specified Namespace URI and local name.
Node list created for nodes with the specified tag name.
Namespace URI for the specified tag name.
Local name (QualifiedName sans Prefix) for nodes included in the list.
Gets the DOM Element with the specified ID attribute value.
DOM Element with the specified ID value.
ID attribute value for the Element to locate in the method.
Represents the DOM Level 3 Document URI.
Constructor for the class instance.
Destructor for the class instance.
Adds an ID Attribute value to a hash list used in the Document.
True if the ID value was added, False if it already exists.
DOM Attribute node with the ID value to add to the hash list.
Hash table representing qualified names used in the document.

Names is a read-only THashTable property used to store QualifiedName values used in the DOM Document. Names is updated when DOM Elements or Attributes with Namespace URIs and qualified names are created in the document. It is also updated (re-hashed) when the Prefix property in the DOM Element or Attribute is changed.

THashTable
Implements an XML Document.

TXMLDocument is a TDOMDocument descendant that implements an XML Document. TXMLDocument provides extensions to the DOM Document interface needed when working with an XML Document. This includes the XMLVersion property as well as the Encoding, StylesheetType, and StylesheetHRef members. Overridden methods are also provided to handle creation of CDATA sections and Processing Instructions using valid XML names for the XMLVersion used in the document.

Sets the value for the XMLVersion property.
New value for the XMLVersion property.
Encoding used for the XML Document.

This member is an extension to the DOM interface.

Type of Stylesheet represented by the StylesheetHRef property.

This member is an extension to the DOM interface.

URL for the Stylesheet to use for the Document.

This member is an extension to the DOM interface.

Creates a new CDATA section in the document.
DOM CDATA section created in the method.
Character data to include in the CDATA section.
Creates a new Processing Instruction in the document.
DOM Processing Instruction created in the method.
Target for the Processing Instruction.
Data for the Processing Instruction.
Creates a new Entity Reference in the document.
DOM Entity Reference created in the method.
Name for the Entity Reference.
XML Version number supported in the document.
Represents Namespace Information used in DOM Node specializations.

TNamespaceInfo is a packed record type used to represent Namespace Information used in DOM Node specializations. Members in the record are used to record the Index Position, PrefixLength, and a hash value for a Qualified Name assigned to namespaced DOM Elements and Attributes. TNamespaceInfo is the type used for the NSI property in TDOMNode_NS.

Please note that the NSIndex and PrefixLength members are declared as Word values. This limits the number of namespaces per document and the prefix length to 65535 (each). It is believed that higher values are only found in deliberately malformed documents.

Index position for the Namespace.
Length of the Namespace Prefix.
Qualified Name for the Namespace.
Enumeration with values for attribute types used in DOM Nodes.
This will eventually be altered or replaced when DOM Level 3 TypeInfo Interface support is introduced.
Attribute contains a CDATA value.
Attribute contains an ID value.
Attribute contains an ID reference.
Attribute contains multiple ID references.
Attribute contains an Entity.
Attribute contains several Entities.
Attribute contains a Name token.
Attribute contains several Name tokens.
Attribute contains a Notation.
Implements a DOM Node with Namespace support.

TDOMNode_NS is a TDOMNode_WithChildren descendant which provides support for Namespaces in DOM Nodes.

TDOMNode_NS extends the ancestor class to implement the use of XML Namespace as required in DOM Level 2. Overridden methods are provided for read and write accessors in the class which access the NodeName, LocalName, NamespaceURI and Prefix properties. It also implements the NSI property which is used to provide information about the Namespaces used in DOM Node specializations.

TDOMNode_NS is the ancestor class for the TDOMAttr and TDOMElement node types.

Gets the value for the NodeName property.
Value for the NodeName property.
Gets the value for the LocalName property.
Value for the LocalName property.
Gets the value for the NamespaceURI property.
Value for the NamespaceURI property.
Gets the value for the Prefix property.
Value for the Prefix property.
Sets the value for the Prefix property.
New value for the Prefix property.
Stores the specified Namespace URI and Prefix length in the Namespace Information for the DOM Document.
Namespace URI added or updated in the method.
Length of the prefix used in qualified names for the namespace.
Compares the specified value to the NodeName for the DOM node.
Difference between the ordinal character values for the first non-matching character in the compared names.
Value compared to the NodeName for the DOM node.
Provides access to Namespace information for the DOM node.
Implements a DOM Node for attributes with Namespace support.
Gets the value for the NodeValue property.
Value for the NodeValue property.
Gets the value for the NodeType property.
Value for the NodeType property.
Gets the value for the Specified property.
Value for the Specified property.
Gets the value for the IsID property.
Value for the IsID property.
Sets the value for the NodeValue property.
New value for the NodeValue property.
Destructor for the class instance.
Creates a copy of the DOM Attribute.
DOM Attribute created in the method.
Provided to remain compatible with the interface defined in DOM Node; not used in DOM Attributes.
Document that owns the new DOM Attribute node.
Represents the name for the DOM Attribute.
Indicates if the value for DOM Attribute was explicitly assigned.
Value for the DOM Attribute.
DOM Element that owns the DOM Attribute node.
Indicates if the DOM Attribute node represents an ID Data type.
Data type for value in the DOM Attribute node.
DataType is an extension to the DOM specification. It is likely to be altered or removed when support is added for the DOM Level 3 TypeInformation Interface.
Implements the DOM Element interface from the DOM specification.

TDOMElement is a TDOMNode_NS descendant that implements the DOM Element interface from the DOM specification. TDOMElement represents an element in an HTML or XML document. It inherits the capabilities defined in ancestor classes, and provides additional methods and properties need for the DOM Element interface.

Methods are provided to access Attributes using the Node interface defined in TDOMNode, or as a simple string value. Namespaces are supported for both the element and its attributes. The Normalize method is overridden to include normalization for values in the Attributes property.

Gets the value for the NodeType property.

GetNodeType is an overridden Integer function in TDOMElement used to get the value for the NodeType property. It returns the value from the ELEMENT_NODE constant as the property value.

Value for the NodeType property.
Gets the value for the Attributes property.

GetAttributes is an overridden TDOMNamedNodeMap function in TDOMElement used to get the value for the Attributes property. It ensures that a TAttributeMap instance has been allocated for the Attributes member. TAttributeMap is an implementation class which provides namespace support in the TDOMNamedNodeMap descendant.

Value for the Attributes property.
Creates attribute nodes with the default attribute values in a namespaced DOM Element.

No actions are performed in the method if namespace information with the qualified name and default attribute values for the Element has not been provided in the NSI property.

AttachDefaultAttrs calls RestoreDefaultAttr to creates and store a TDOMAttr instance in Attributes for each of the default attribute names and values found in the namespace information.

AttachDefaultAttrs is called from the CreateElement and CreateElementNS methods in TDOMDocument.

Gets the Namespace Prefix used for the specified Namespace URI.
Prefix used for the Namespace in the current or ancestor DOM Element.
Namespace URI to locate in the method.
Original DOM Element to use for the Lookup.
Restores the specified default attribute name and value in the DOM Element.

RestoreDefaultAttr is a method used to restore the default attribute name and value specified in AttrDef to the Attributes for the DOM Element.

RestoreDefaultAttr checks for a namespace prefix in the name for the attribute, and applies the default namespace information for names starting with 'xmlns' or 'xml'. It calls LookupNamespaceURI to get and set the namespace URI for a name which starts with another prefix. It calls SetAttributeNode to add or update the node in the Attributes property.

RestoreDefaultAttr is called from the AttachDefaultAttrs method in TDOMElement. It is also called from the RestoreDefault method in TDOMNamedNodeMap.

DOM Attribute used as the baseline.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. It ensures that the Flags for the node are updated to include the value nfDestroying. If the OwnerDocument for the node has a hash table for node IDs, its RemoveID method is called to remove the current class instance. Destroy frees resources allocated for the Attributes property, and calls the inherited destructor prior to exit.

Creates a DOM node that is a copy of the DOM Element.

CloneNode is an overridden TDOMNode function in TDOMElement. It re-implements the method from the ancestor class to create a cloned copy of the DOM Element and its Attributes in the DOM Document specified in the ACloneOwner argument.

The cloning mechanism differs depending on whether ACloneOwner and OwnerDocument are the same TDOMDocument instance. Essentially, namespace information in the NSI property is reused when the document instances are the same, and only default attributes are cloned when the documents differ.

When deep is set to True, the CloneChildren method is called to recursively copy the ChildNodes for the Element.

DOM Node created in the method.
Indicates if the entire DOM sub-tree is copied for the DOM Element.
DOM Document that owns the new Node(s) created in the method.
Indicates if the DOM Element does not have any content.

IsEmpty is a Boolean function used to determine if the DOM element does not have any content. The return value is True when Attributes has not been assigned (contains Nil) or has a Length / Count of 0.

Technically, this implementation is incorrect. An empty element is one which has no child Text or Element nodes. And, an empty element can have attributes values (default or specified). Use HasChildNodes instead.
True when the DOM Element is empty.
Performs normalization for Text nodes and Attributes in the DOM Element.

Normalize is an overridden method in TDOMElement used to perform normalization for Text and Attribute nodes in the DOM element.

Normalize convert child text nodes in the sub-tree to their normal form where only structure nodes separate the text nodes. Adjacent text nodes are combined into a single text node. Adjacent text nodes which contain only ignorable whitespace are consolidated into a single whitespace value. The same actions are performed for nodes in the Attributes property.

Normalize implements the method defined for the DOM Node interface in the DOM Level 2 Specification.

The qualified name used as the Tag name for the DOM Element.

TagName is a read-only DOMString property which contains the tag name for the DOM Element. TagName can contain a qualified name which includes a Prefix for a Namespace used in the Element or its owner Document.

The property value is set when the Element is created using the argument passed to the CreateElement method in TDOMDocument. The value for the property is read from NodeName.

Gets the value for the AttribStrings property.

GetAttribute is a DOMString function used to the value for the indexed AttribStrings property. The name argument contains the name for the attribute node to locate in the Attributes property.

No actions are performed in the method if the Attributes property has not been assigned in the class instance.

Value for the AttribStrings property.
Name for the DOM Attribute requested in the method.
Sets the value in the AttribStrings property.

SetAttribute is a method used to set the value for an attribute in the indexed AttribStrings property. It calls Changing to ensure that the DOM Element is not marked as read-only. An EDOMError exception is raised if the element cannot be modified.

SetAttribute locates the TDOMAttr in the Attributes property with the name specified in the name argument. If it is not found, a new TDomAttr instance is created with the required name and added to Attributes. SetAttribute stores the value argument as the NodeValue for the attribute instance.

Name of the DOM Attribute updated in the method.
New value for the attribute in the AttribStrings property.
Removes the DOM Attribute with the specified name.
Name of the DOM Attribute removed in the method.
Gets the DOM Attribute node with the specified name.
DOM Attribute node with the specified name.
Name for the DOM Attribute in the return value.
Stores the new DOM Attribute node to an existing Attribute with the same name.
DOM Attribute node updated in the method.
DOM Attribute node with the new value stored in Attributes.
Removes the specified DOM Attribute node from the Attributes for the Element.
DOM Attribute node removed in the method.
DOM Attribute node to remove from the Attributes for the Element.
Gets a list of DOM nodes with the specified name in the sub-tree for the Element.
DOM Node list with the specified tag name.
Tag name to locate in the DOM sub-tree.
Gets the value for an Attribute with the specified Namespace URI and local name.
Value for the DOM Attribute requested in the method.
Namespace URI for the Attribute requested in the method.
Local name for the Attribute requested in the method.
Sets the value for the DOM Attribute with the specified Namespace URI and qualified name.
Namespace URI for the DOM Attribute updated in the method.
QualifiedName for the DOM Attribute updated in the method.
New value for the DOM Attribute with the specified Namespace URI and Qualified Name.
Removes the DOM Attribute with the specified Namespace URI and local name.
Namespace URI for the DOM Attribute.
Local name for the DOM Attribute.
Gets the DOM Attribute node with the specified Namespace URI and local name.
DOM Attribute node with the requested Namespace URI and local name.
Namespace URI for the DOM Attribute.
Local name for the DOM Attribute.
Stores the new DOM Attribute node in an existing Namespaced Attribute node.
Existing DOM Attribute node updated in the method.
DOM Attribute node with the Namespace URI, Local name, and value stored in the method.
Gets a Node list with Elements having the specified Namespace URI and local name.
DOM Node list created in the method.
Namespace URI for the requested nodes.
Local name for the requested nodes.
Indicates if the Attributes property contains an item with the specified name.
True when an Attribute with the specified name exists in the Attributes property.
Name of the Attribute to locate in the method.
Indicates if Attributes contains an attribute with the specified Namespace URI and local name.
True Attributes contains an entry with the specified Namespace URI and local name.
Namespace URI for the DOM Attribute.
Local name for the DOM Attribute.
Indicates if the Attributes property contains DOM Attribute nodes.

The return value is True when Attributes has been assigned and its Length is not 0.

False when Attributes has not been assigned, or has a Length of 0 (zero).
Provides indexed access to Attributes and their value as a String.

AttribStrings is an indexed DOMString property that provides access to the value for a DOM Attribute by its Name. AttribStrings is an extension to the DOM specification. It provides a simpler mechanism for reading and writing Attribute values than the methods provided in the DOM Node interface. It is especially useful for DOM documents where Attributes are known to contain simple DOMString data types (like HTML).

Read and write access to AttribStrings is redirected to the Attributes property. When reading a DOM Attribute, the value is an empty string ('') if the Attributes property does not contain an Attribute node with the requested Name. When writing a DOM Attribute, the Attribute node is created if it does not exist already.

AttribStrings does not take Qualified names or Namespaces into consideration when accessing values in the Attributes property. Use the GetAttributeNS, SetAttributeNS, or RemoveAttributeNS methods when Namespace support is required for DOM Attributes.

Name of the DOM Attribute accessed in the indexed property.
Implements the DOM Text interface from the DOM specification.

TDOMText is a TDOMCharacterData descendant that implements the DOM Text interface from the DOM specification. TDOMText represents the textual content (called character data in XML) for a DOM Element or Attribute. It provides overridden methods which implement the NodeName and NodeValue properties as required for the DOM Node specialization.

Adjacent TDOMText nodes may be combined when the Normalize method is called for the ParentNode, and Text nodes with only whitespace in their content may be removed. This is the case when the DOM node has the value nfIgnorableWS in its Flags property.

Gets the value for the NodeType property.
Value for the NodeType property.
Gets the value for the NodeName property.
Value for the NodeName property.
Sets the value for the NodeValue property.
New value for the NodeValue property.
Makes a copy of the DOM Node.
New DOM Node created in the method.
Indicates if child nodes in the sub-tree are included in the cloned DOM node.
DOM Document used to create the cloned DOM node.
Splits the textual content at the specified offset into a new DOM Text node.
New DOM node created in the method.
Offset in the textual content where the Text node is split.
Indicates if the textual content for the node is whitespace characters.
True when nfIgnorableWS is included in the Flags for the DOM node.
Implements the DOM Comment interface from the DOM specification.

TDOMComment is a TDOMCharacterData descendant that implements the DOM Comment interface from the DOM specification. TDOMComment provides overridden methods needed to implement the NodeType and NodeName properties as required for the DOM Node specialization.

TDOMComment represents the textual content for a comment that appears between the '<!--' and '-->' delimiters. This is the definition for a comment as defined in the XML 1.0 specification and in HTML. The NodeValue can contain any values except the start and end delimiters for a comment.

Gets the value for the NodeType property.
Value for the NodeType property.
Gets the value for the NodeName property.
Value for the NodeName property.
Makes copy of the DOM Comment node.

CloneNode is a TDOMNode function used to create a copy or clone of the current DOM Comment node using the specified DOM Document as the owner of the new node. CloneNode calls the CreateComment method in the ACloneOwner argument to allocate and create the new TDOMComment instance, and store the character data in its Data property.

The value for the deep argument is not significant in the method; it is not used to clone a comment node.

DOM node created in the method.
True if child nodes are recursively copied in the method.
DOM Document used to created the new DOM Comment node.
Implements the DOM CDataSection interface from the DOM specification.

TDOMCDATASection is a TDOMText descendant that implements the DOM CDATASection interface from the DOM specification. TDOMCDATASection provides overridden methods needed to implement the NodeType and NodeName properties as required for the DOM Node specialization.

TDOMCDATASection is used to escape text that contains characters that would otherwise be regarded as markup in a DOM document. TDOMCDATASection contains the textual content as it appears between the '<![CDATA[' and ']]>' delimiters. Its primary purpose is to include material such as XML fragments, without needing to escape all of the markup.

Please note that Markup (other than the ending delimiter) is ignored in a CDATA section. This means that the ending delimiter cannot be included in a CDATA section. Character numeric entity references cannot be used to escape content in a CDATA section.

Gets the value for the NodeType property.

GetNodeType is an overridden Integer function in TDOMCDATASection. It returns the value from the CDATA_SECTION_NODE constant as the property value.

Value for the NodeType property.
Gets the value for the NodeName property.

GetNodeName is an overridden DOMString function in TDOMCDATASection. It returns '#cdata-section' as the property value.

Value for the NodeName property.
Makes a copy of the DOM CDATA Section.

CloneNode is a TDOMNode function used to create a copy or clone of the current DOM CDATA section using the specified DOM Document as the owner of the new node. CloneNode calls the CreateCDATASection method in the ACloneOwner argument to allocate and create the new TDOMCDATASection instance with NodeValue from the current class instance.

The value for the deep argument is not significant in the method; it is not used to clone a CDATA node.

DOM Node created with the value for the CDATA Section.
Not used in the method.
DOM Document used to created the new DOM CDATA section node.
Implements the DOM DocumentType interface from the DOM specification.

TDOMDocumentType is a TDOMNode descendant that implements the DOM DocumentType Interface from the DOM specification.

Each DOM Document has a DocType property whose value is either Nil or a TDOMDocumentType instance. It provides an interface to the list of entities and notations that are defined for the document, as well as the PublicID and SystemID for the external subset.

It is often referred to as a DTD (Document Type Definition).

Gets the value for the Entities property.

Ensures that a TDOMNamedNodeMap instance using the ENTITY_NODE node type has been allocated for the Entities property.

Value for the Entities property.
Gets the value for the Notations property.

Ensures that a TDOMNamedNodeMap instance using the NOTATION_NODE node type has been allocated for the Notations property.

Value for the Notations property.
Gets the value for the NodeType property.

GetNodeType is an overridden Integer function in TDOMDocumentType used to get the value for the NodeType property. It returns the value in the DOCUMENT_TYPE_NODE constant as the property value.

Value for the NodeType property.
Gets the value for the NodeName property.

GetNodeName is an overridden DOMString function in TDOMDocumentType used to get the value for the NodeName property. It returns the value in Name as the property value.

Value for the NodeName property.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. It ensures that resources allocated for the Entities and Notations properties are freed. It calls the inherited destructor prior to exit.

Name for the Document Type declaration (used as the root element).

Name is a read-only DOMString property which contains the name for the document type declaration. This is the value used as the root element in a document instance created using the DTD. Name is set to the qualified name provided when the class instance is created using the CreateDocumentType method in TDOMImplementation.

Entities declared in the Document Type declaration.

Entities is a read-only TDOMNamedNodeMap property which contains the internal and external general entities declared in the DTD. It does not contain parameter entities.

Notations declared in the Document Type declaration.

Notations is a read-only TDOMNamedNodeMap property which contains the Notation declarations for the DTD. From the XML 1.0 Specification:

"Notations identify by name the format of unparsed entities, the format of elements which bear a notation attribute, or the application to which a processing instruction is addressed."

Public Identifier for the Document Type declaration.

PublicID is a read-only DOMString property which contains the public identifier for the external subset in the document type declaration. It contains the value passed as an argument to the CreateDocumentType method in TDOMImplementation, and stored in the new class instance.

PublicID was introduced in the SGML specifications (the predecessor of XML), and had an elaborate Formal Public Identifier format. For DOM and XML, the content has generally been simplified to an organization identifier and URL where the DTD is located. For example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

or

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN" "http://www.oasis-open.org/docbook/xml/5.0/docbookx.dtd">

Use SystemID for the location on the local file system where the DTD is stored.

PublicID and SystemID are not validated in the DOM implementation (unlike XML). Both (or neither) of the values can be specified. URLs or local file paths are not verified.
System Identifier for the Document Type declaration.

SystemID is a read-only DOMString property which contains the path to the document type declaration on the local file system. Its value is assigned using the argument passed to the CreateDocumentType method in TDOMImplementation.

Use PublicID for the URL where the DTD is located.

PublicID and SystemID are not validated in the DOM implementation (unlike XML). Both (or neither) of the values can be specified. URLs or local file paths are not verified.
The internal subset for the Document Type declaration.

InternalSubset is a read-only DOMString property which contains the portion of the document type declaration declared inline instead of externally. For example:

<!DOCTYPE person SYSTEM "name.dtd" [ <!ELEMENT profession (#PCDATA)> <!ELEMENT person (name, profession*)> ]>

This document type declaration declares the profession and person elements as an internal subset, but relies on the file name.dtd to contain the declaration of the name element. The part of the DTD between the '[' and ']' brackets is the internal subset.

Implements the DOM Notation interface from the DOM specification.

TDOMNotation is a TDOMNode descendant which implements the Notation interface from the DOM specification. It declares the name and format for an unparsed entity declared in a Document Type Declaration (DTD). It can also be used to set the target for a processing instruction that handles the notation. Notations are a vestige of the older SGML standard, and provided for migration purposes. They are seldom used (if at all) in modern XML processing implementations.

Gets the value for the NodeType property.
Value for the NodeType property.
Gets the value for the NodeName property.
Value for the NodeName property.
Makes a copy of the DOM Node.
DOM Node created in the method.
True if child nodes are recursively copied in the method.
Document which owns the cloned notation node.
Public Identifier for the Document Type declaration.
System Identifier for the Document Type declaration.
Implements the DOM Entity interface from the DOM specification.

TDOMEntity is a TDOMNode_WithChildren descendant which implements the Entity interface from the DOM specifications. An Entity is declared as part of a Document Type Declaration (DTD), and can be either parsed or unparsed in the content model. The following is an example of internal and external Entity declarations:

<!ENTITY copyrightholder "ACME Corporation"> <!ENTITY copyrightholder PUBLIC "https://www.w3c.org/entities.dtd"> <!ENTITY copyrightholder SYSTEM "/path/to/entities.dtd"> <!-- Usage: --> <COPYRIGHT> 1999-2021, &copyrightholder;. All rights reserved. </COPYRIGHT>

TDOMEntity provides the Name (NodeName), PublicID or SystemID, and NotationName (when used) properties used to represent the entity declaration.

Gets the value for the NodeType property.

Returns ENTITY_NODE as the property value.

Value for the NodeType property.
Gets the value for the NodeName property.
Value for the NodeName property.
Makes a copy of the DOM node with the specified owner document.

CloneNode is an overridden TDOMNode function in TDOMEntity used to make a copy of the node with ACloneOwner as the owner document for the new node. It re-implements the method from the ancestor class.

CloneNode allocates a new TDOMEntity instance in the node pool for ACloneOwner, and creates the DOM Entity node in the return value. Values from the PublicID, SystemID, and NotationName properties are copied to the new node. The internal name for the Entity (set when the owner document was de-serialized) is also copied to the new node. When deep is True, the CloneChildren method is called to copy the ChildNodes (when assigned) to the new node.

CloneNode calls SetReadOnly to ensure that the new node cannot be modified. The cloned node does not have a parent node.

DOM node created in the method.
True if child nodes are recursively copied in the method.
Document which owns the clones Entity node.
Public Identifier for the Entity.

Can contain a URL where the DTD with the entity declaration is located on the internet. It can contain the Formal Public Identifier notation used in SGML/XML.

System Identifier for the Entity.

Can contain a path to the DTD with the entity declaration on the local file system.

Notation name for the Entity.

Can contain the DOM Notation name used for the Entity. This is seldom used in modern XML processors.

Implements the DOM EntityReference interface from the DOM specification.
Gets the value for the NodeType property.
Value for the NodeType property.
Gets the value for the NodeName property.
Value for the NodeName property.
Makes a copy of the DOM Entity Reference node.
New DOM node created in the owner document.
True if child nodes are recursively copied in the method.
Document which owns the cloned entity reference node.
Implements the DOM ProcessingInstruction interface from the DOM specification.

TDOMProcessingInstruction is a TDOMNode descendant that implements the DOM ProcessingInstruction Interface from the DOM specification. TDOMProcessingInstruction provides access to an XML Processor-specific instruction that occurs in a DOM Document.

TDOMProcessingInstruction provides overridden methods used as the read and write access specifiers for the DOM Node specialization. It also contains properties needed to represent the Target and Data for the DOM ProcessingInstruction.

Gets the value for the NodeType property.
Value for the NodeType property.
Gets the value for the NodeName property.
Value for the NodeName property.
Gets the value for the NodeValue property.
Value for the NodeValue property.
Sets the value for the NodeValue property.
New value for the NodeValue property.
Makes a copy of the DOM Node.
DOM Node created in the method.
True if child nodes are recursively copied in the method.
Document which owns the cloned processing instruction node.
Represent the Target for the DOM ProcessingInstruction node.
Contains the Data for the DOM ProcessingInstruction node.
Enumerated type with methods for getting the attribute node value.

TAttrDefault is an enumerated type with values which indicates how the value for a default attribute node was specified. TAttrDefault is the type used to implement the Defaultproperty in TDOMAttrDef.

Attribute value is implied.
Attribute value is the default.
Attribute value is required.
Attribute value is fixed.
Implements the default attribute node introduced in DOM Level 2.

TDOMAttrDef is a TDOMAttr descendant which implements the default attribute node as specified in the DOM Level 2 specification. A default attribute is associated with an Element of a given type in a Document Type Declaration (whether internal or external). It can have a value which is either explicitly specified, implied from the DTD, or fixed to given value. Its value can also be limited to only those values specified in the attribute definition.

TDOMAttrDef is the type returned from the TDOMDocument.CreateAttributeDef method. It is also used to update attribute value for an Element in methods like: TDOMNamedNodeMap.RestoreDefault and TDOMElement.AttachDefaultAttrs.

Adds the specified value to the allowed values for the attribute node.

Checks existing values in the enumeration to prevent duplicates. The return value is False if Buf already exists in the enumeration.

True if the value was successfully added in the method.
DOMPChar value added to the enumeration.
Length of the value in Buf.
Checks whether the specified value is one of the allowed values for the attribute.
True if the specified value exists the enumeration values.
Value to locate in the enumeration.
Makes a copy of the attribute node with the specified owner document.

CloneNode is an overloaded, overridden method in TDOMAttrDef used to make a copy of the default attribute node using the specified owner document. CloneNode calls the inherited method on entry, and ensures that the node Flags include the value nfSpecified.

DOM node created in the method.
True if child nodes are recursively copied in the method.
Document which owns the cloned DOM node.
Indicates the origin of the value in the attribute node.

Default is a TAttrDefault property which indicates how the NodeValue for the attribute node was derived. It contains a value from the TAttrDefault enumeration, and allows values like:

adImplied
  Attribute value is implied in a DTD.
adDefault
  Attribute value is the default value from the DTD.
adRequired
  An Attribute value is required.
adFixed
  Attribute has a fixed value provided in the DTD.

The property value is used in methods like TDOMNamedNodeMap.RestoreDefault and TDOMElement.AttachDefaultAttrs.

Indicates if the attribute was declared in an external subset of the DTD.

ExternallyDeclared is a Boolean property which indicates if the attribute is declared in an external subset of the DTD in the owner document.

Tag is a Cardinal property.

?

Pointer to a TExtent type.
Record type with a pointer to its extent, followed by an array TDOMNode instances.
Pointer to the next extent in a Node pool.
Provides custom memory management when DOM Nodes are created.

TNodePool is a class used to provide custom memory management when DOM nodes are created in a DOM document. Each TNodePool instance manages objects with the same instance size (and may be a different class types). TDOMDocument provides an internal array of TNodePool instances that are maintained when DOM nodes are created in its Alloc method.

Allocates a new extent with the specified number of storage slots.

Raises an EAssertionFailed exception for the following conditions:

- The current extent does not have any allocated storage.
- The array of node instances exceeds the available size for the current extent.
- The element count argument is zero (0).

Calls GetMem to reserve the amount storage indicated by the AElemCount argument and the element size specified in the constructor. AddExtent switches the node pool to the newly allocated extent prior to exiting from the method.

GetMem
Number of storage slots to reserve in the new extent.
Constructor for the class instance.

Allocates an extent with the specified number of entries when the node pool is created.

Size for the class instances stored in the node pool.
Number of storage slots for nodes in the node pool.
Destructor for the class instance.
Creates a new DOM node instance and stores it in the node pool.
DOM node instance created and stored in the node pool.
Class reference used to create the DOM node instance.
Frees the specified DOM node and removes it from the node pool.
DOM node freed and de-allocated from the node pool.
Pointer to a TNodePoolArray instance.

PNodePoolArray is a Pointer to the TNodePoolArray type. It is used to implement the internal node pools in TDOMDocument.

Implements an array of TNodePool instances.
Specifies an array of TNodePool instances.

TNodePoolArray is an array type which contains TNodePool instances in its elements. The number of elements in the array is defined using:

MaxInt div SizeOf(Pointer)-1

A Pointer to TNodePoolArray is the type used to implement the internal node pools in TDOMDocument.

Namespace URI for the xml prefix.

stduri_xml is a DOMString constant that contains the Namespace URI bound to the xml Namespace prefix. stduri_xml and stduri_xmlns are used to set the default Namespaces prefixes and URIs in TDOMDocument:

Prefix | Namespace URI
xml | http://www.w3.org/XML/1998/namespace
xmlns | http://www.w3.org/2000/xmlns/

Namespace URI for the xmlns prefix.

stduri_xmlns is a DOMString constant that contains the Namespace URI bound to the xmlns Namespace prefix. stduri_xml and stduri_xmlns are used to set the default Namespaces prefixes and URIs in TDOMDocument:

Prefix | Namespace URI
xml | http://www.w3.org/XML/1998/namespace
xmlns | http://www.w3.org/2000/xmlns/

Converts a string to it representation as XML character data.

StrToXMLValue is a String function used to convert the value in s to its representation as valid XML character data. The XML specification has five "predefined entities" that represent special characters. StrToXMLValue ensures that any of these characters in s are converted to their representation as a Character Entity, including:

Character | Entity Name | Unicode Codepoint | Description
&quot; | " | U+0022 (Decimal 34) | Double quotation Mark
&amp; | & | U+0026 (Decimal 38) | Ampersand
&apos; | ' | U+0027 (Decimal 39) | Apostrophe (Apostrophe-Quote)
&lt; | < | U+003C (Decimal 60) | Less-than
&gt; | > | U+003E (Decimal 62) | Greater-than

StrToXMLValue also ensures that any NULL character values (Decimal 0) in s are removed.

No actions are performed in the method when s is an empty string ('').

Use XMLValueToStr to convert XML character data to its representation as a String data type.

XMLValueToStr
XML character data for the specified value.
Values to convert to XML character data.
Converts XML character data to its representation as a string value.

XMLValueToStr is a String function used to convert the XML character data in s to its representation as a string data type. The XML specification has five "predefined entities" that represent special characters. XMLValueToStr ensures that any of these character entities in s are converted to their plain string representation, including:

Character | Entity Name | Unicode Codepoint | Description
&quot; | " | U+0022 (Decimal 34) | Double quotation Mark
&amp; | & | U+0026 (Decimal 38) | Ampersand
&apos; | ' | U+0027 (Decimal 39) | Apostrophe (Apostrophe-Quote)
&lt; | < | U+003C (Decimal 60) | Less-than
&gt; | > | U+003E (Decimal 62) | Greater-than

XMLValueToStr also ensures that any NULL character values (Decimal 0) in s are removed.

No actions are performed in the method when s is an empty string ('').

Use StrToXMLValue to convert a string data type to its representation as XML character data.

StrToXMLValue
Plain string representation for the XML character data.
XML character data to convert in the method.
Converts instance of the reserved characters.

EncodeLesserAndGreaterThan is a String function used to convert instances of the reserved characters in s. EncodeLesserAndGreaterThan is similar to StrToXMLValue, but handles only the '<' and '>' characters, or NULL (Decimal 0) byte values in the string. No actions are performed in the routine when s is an empty string (''). The return value reflects the string value after conversion.

StrToXMLValue
Converted values from the function.
Values to convert in the routine.
Alias for the TList type.

Implemented when the symbol fpc has not been defined.