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

TDOMNode

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

Implements the DOM Node interface.

Declaration

Source position: laz2_dom.pas line 226

type TDOMNode = class

protected

  FPool: TObject;

  FFlags: TNodeFlags;

  FParentNode: TDOMNode;

  FPreviousSibling: TDOMNode;

  FNextSibling: TDOMNode;

  FOwnerDocument: TDOMDocument;

  function GetNodeName; virtual; abstract;

  

Gets the value for the NodeName property.

  function GetNodeValue; virtual;

  

Gets the value for the NodeValue property.

  procedure SetNodeValue(); virtual;

  

Sets the value for the NodeValue property.

  function GetFirstChild; virtual;

  

Gets the value for the FirstChild property.

  function GetLastChild; virtual;

  

Gets the value for the LastChild property.

  function GetAttributes; virtual;

  

Gets the value for the Attributes property.

  function GetRevision;

  

Gets the revision number for the node.

  function GetNodeType; virtual; abstract;

  

Gets the value for the NodeType property.

  function GetTextContent; virtual;

  

Gets the value for the TextContent property.

  procedure SetTextContent(); virtual;

  

Sets the value in the TextContent property.

  function GetLocalName; virtual;

  

Gets the value for the LocalName property.

  function GetNamespaceURI; virtual;

  

Gets the value for the NamespaceURI property.

  function GetPrefix; virtual;

  

Gets the value for the Prefix property.

  procedure SetPrefix(); virtual;

  

Sets the value for the Prefix property.

  function GetOwnerDocument; virtual;

  

Gets the value for the OwnerDocument property.

  function GetBaseURI;

  

Gets the value for the BaseURI property.

  procedure SetReadOnly();

  

Updates the read-only Node flag for the DOM Node and its children.

  procedure Changing;

  

Determines if the Node and its owner document can be modified.

public

  constructor Create();

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure FreeInstance; override;

  

Performs actions needed to free the class instance.

  function GetChildNodes;

  

Gets the value for the ChildNodes property.

  function GetChildCount; virtual;

  

Gets the number of Child nodes for the DOM node.

  property NodeName: DOMString; [r]

  

Name for the DOM node.

  property NodeValue: DOMString; [rw]

  

Value for the DOM node.

  property NodeType: Integer; [r]

  

Node type for the DOM Node.

  property ParentNode: TDOMNode; [r]

  

DOM node that is the immediate ancestor of this node.

  property FirstChild: TDOMNode; [r]

  

Gets the first child node for the current node.

  property LastChild: TDOMNode; [r]

  

Gets the last child node for the current node.

  property ChildNodes: TDOMNodeList; [r]

  

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

  property PreviousSibling: TDOMNode; [r]

  

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

  property NextSibling: TDOMNode; [r]

  

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

  property Attributes: TDOMNamedNodeMap; [r]

  

Contains Attribute for the DOM Node.

  property OwnerDocument: TDOMDocument; [r]

  

DOM Document that created the DOM node.

  function GetEnumerator;

  

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

  function GetEnumeratorAllChildren;

  

Gets an enumerator for DOM Nodes that are children or grand children for the node.

  function GetNextNode;

  

Gets the next Child or Sibling node for the DOM node.

  function GetNextNodeSkipChildren;

  

Gets the next sibling for the node in the DOM hierarchy.

  function GetPreviousNode;

  

Gets the previous node in the DOM node hierarchy.

  function GetLastLeaf;

  

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

  function GetLevel;

  

Gets the level in the DOM tree for the DOM node.

  function InsertBefore(); virtual;

  

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

  function ReplaceChild(); virtual;

  

Replaces a child node with the specified DOM node.

  function DetachChild(); virtual;

  

Detaches the specified child node from the DOM sub-tree for the node.

  function RemoveChild();

  

Removes the specified child from the DOM sub-tree for this node.

  function AppendChild();

  

Appends the specified node as a child in the current node.

  function HasChildNodes; virtual;

  

Indicates if the DOM node has child nodes.

  function CloneNode();

  

Makes a copy of the DOM node.

  function IsSupported();

  

Indicates if the DOM implementation supports a specific feature at a given conformance level.

  function HasAttributes; virtual;

  

Indicates if the DOM node has attribute names and values.

  procedure Normalize; virtual;

  

Normalizes text nodes and attributes in the Node sub-tree.

  property NamespaceURI: DOMString; [r]

  

URI for the NameSpace assigned to the DOM Node.

  property LocalName: DOMString; [r]

  

Name without the NameSpace prefix assigned to the DOM Node.

  property Prefix: DOMString; [rw]

  

Prefix used for the assigned NameSpace in the DOM Node.

  property TextContent: DOMString; [rw]

  

Textual representation for the DOM Node.

  function LookupPrefix();

  

Locates the Prefix for the specified NameSpace URI.

  function LookupNamespaceURI();

  

Locates the NameSpace URI for the specified Prefix.

  function IsDefaultNamespace();

  

Indicates if the specified NameSpace URI is the default namespace for the DOM node.

  property baseURI: DOMString; [r]

  

Provides the BaseURI for the node relative to its Owner document.

  function FindNode(); virtual;

  

Finds the Child Node with the specified name.

  function CompareName(); virtual;

  

Compares the NodeName in the DOM Node to the specified value.

  property Flags: TNodeFlags; [r]

  

Provides access to the Node Flags for the DOM Node.

end;

Inheritance

TDOMNode

  

Implements the DOM Node interface.

|

TObject

Description

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.

See also

laz2_XMLWrite.WriteXML

  

Writes a DOM Node to a file, text file, or stream.

laz2_XMLRead.ReadXMLFragment

  

Reads an XML fragment into the specified DOM Node.


Version 3.2 Generated 2024-02-25 Home