[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'Laz2_DOM' (#lazutils)

TDOMDocument

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements the DOM Document interface.

Declaration

Source position: laz2_dom.pas line 474

type TDOMDocument = class(TDOMNode_WithChildren)

protected

  FIDList: THashTable;

  FRevision: Integer;

  FXML11: Boolean;

  FImplementation: TDOMImplementation;

  FNamespaces: TNamespaces;

  FNames: THashTable;

  FEmptyNode: TDOMElement;

  FNodeLists: THashTable;

  FMaxPoolSize: Integer;

  FPools: PNodePoolArray;

  FDocumentURI: DOMString;

  function GetDocumentElement;

  

Gets the value for the DocumentElement property.

  function GetDocType;

  

Gets the value for the DocType property.

  function GetNodeType; override;

  

Gets the value for the NodeType property.

  function GetNodeName; override;

  

Gets the value for the NodeName property.

  function GetTextContent; override;

  

Gets the value for the TextContent property.

  function GetOwnerDocument; override;

  

Gets the value for the OwnerDocument property.

  procedure SetTextContent(); override;

  

Sets the value for the TextContent property.

  procedure RemoveID();

  

Removes a DOM element from the hash table used for IDs in the document.

  function GetChildNodeList();

  

Gets a DOM Node List with the children for the specified DOM Node.

  function GetElementList();

  

Gets a DOM Element List with elements found in the specified DOM Node.

  procedure NodeListDestroyed();

  

Signals that the specified list can be removed from the internal hash table.

  function Alloc();

  

Ensures the DOM node class type is allocated using the Node pool for the document.

public

  function IndexOfNS();

  

Gets the ordinal position for the specified namespace URI in the document namespaces.

  function InsertBefore(); override;

  

Inserts a DOM Node prior to the reference DOM node.

  function ReplaceChild(); override;

  

Replaces a child node with another DOM node.

  property DocType: TDOMDocumentType; [r]

  

Document Type declaration used in the document.

  property Impl: TDOMImplementation; [r]

  

Provides access to the DOM Implementation for the document.

  property DocumentElement: TDOMElement; [r]

  

Gets the root element for the document.

  function CreateElement(); virtual;

  

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

  function CreateElementBuf();

  

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

  function CreateDocumentFragment;

  

Creates a new DOM Document Fragment.

  function CreateTextNode();

  

Creates a new DOM Text node with the specified value.

  function CreateTextNodeBuf();

  

Creates a new DOM Text node with the specified value.

  function CreateComment();

  

Creates a new DOM Comment with the specified content.

  function CreateCommentBuf();

  

Created a new DOM Comment using the specified content.

  function CreateCDATASection(); virtual;

  

Creates a new DOM CDATA section with the specified content.

  function CreateProcessingInstruction(); virtual;

  

Creates a new DOM Processing Instruction.

  function CreateAttribute();

  

Creates a new DOM Attribute with the specified name.

  function CreateAttributeBuf();

  

Creates a new DOM Attribute with the specified name.

  function CreateAttributeDef();

  

Creates a new Attribute with a default value.

  function CreateEntityReference(); virtual;

  

Creates a new DOM Entity Reference for the specified name.

  function GetElementsByTagName();

  

Gets a list of nodes with the specified tag name.

  function ImportNode();

  

Imports a copy of the DOM node into the current document.

  function CreateElementNS();

  

Creates a new DOM Element with the specified Namespace URI.

  function CreateAttributeNS();

  

Creates a new Attribute with the specified Namespace URI and qualified name.

  function GetElementsByTagNameNS();

  

Gets a list of nodes with the specified Namespace URI and local name.

  function GetElementById();

  

Gets the DOM Element with the specified ID attribute value.

  property documentURI: DOMString; [rw]

  

Represents the DOM Level 3 Document URI.

  constructor Create;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  function AddID();

  

Adds an ID Attribute value to a hash list used in the Document.

  property Names: THashTable; [r]

  

Hash table representing qualified names used in the document.

end;

Inheritance

TDOMDocument

  

Implements the DOM Document interface.

|

TDOMNode_WithChildren

  

Extends TDOMNode to allocate storage for child nodes.

|

TDOMNode

  

Implements the DOM Node interface.

|

TObject

Description

TDOMDocument is a TDOMNode_WithChildren descendant that implements the DOM Document interface from the DOM specification. TDOMDocument is the container that represents the content for the entire HTML or XML document. It acts as the root of the DOM tree.

TDOMDocument provides factory methods needed to create elements, attributes, text nodes, comments, processing instructions, etc. These items cannot exist without an owner document. It also provides methods used to import nodes created in another document or document fragment.

TDOMDocument provides support for XML Namespaces introduced in DOM Level 2. The following namespace prefixes and URIs are always assigned in TDOMDocument:

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

TDOMDocument includes the DocumentURI property introduced in DOM Level 3.

See also

TDOMNode_WithChildren

  

Extends TDOMNode to allocate storage for child nodes.

TXMLDocument

  

Implements an XML Document.

laz2_XMLWrite.WriteXMLFile

  

Writes an XML document to a file, text file, or stream.

laz2_XMLRead.ReadXMLFile

  

Reads the content of an XML file into the specified XML document.

laz2_XMLRead.ReadDTDFile

  

Reads and stores a DTD file into the specified XML document.


Version 3.2 Generated 2024-02-25 Home