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

TDOMNamedNodeMap

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

Implements the NamedNodeMap interface in the DOM specification.

Declaration

Source position: laz2_dom.pas line 384

type TDOMNamedNodeMap = class(TObject)

protected

  FOwner: TDOMNode;

  FNodeType: Integer;

  FSortedList: TFPList;

  FPosList: TFPList;

  function GetPosItem();

  

Gets the value for the Item property.

  function GetSortedItem();

  

Gets the value for the indexed SortedItem property.

  function GetLength;

  

Gets the value for the Length property.

  function FindSorted();

  

Finds a DOM Node with the specified name in the sorted container.

  function DeleteSorted();

  

Deletes the DOM node at the specified position in the sorted list of nodes.

  procedure RestoreDefault();

  

Restores the default value for the attribute node with the specified name.

  function InternalRemove();

  

Performs actions need to remove an attribute node with the specified name.

  function ValidateInsert();

  

Performs actions to determine if an inserted attribute node is valid for its context.

public

  constructor Create();

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  function GetNamedItem();

  

Gets the item with the specified name.

  function SetNamedItem();

  

Sets the value for a named item to the specified node.

  function RemoveNamedItem();

  

Removes the node with the specified name.

  function getNamedItemNS(); virtual;

  

Gets the Item with the specified Namespace URI and local name.

  function setNamedItemNS(); virtual;

  

Sets a namespaced node to the specified value.

  function removeNamedItemNS(); virtual;

  

Remove a DOM Node with the specified Namespace URI and local name.

  property Item []: TDOMNode; default; [r]

  

Provides indexed access to the unsorted DOM Nodes in the container.

  property SortedItem []: TDOMNode; [r]

  

Provides indexed access to the sorted DOM Nodes in the container.

  property Length: LongWord; [r]

  

Indicates the Length of the container.

end;

Inheritance

TDOMNamedNodeMap

  

Implements the NamedNodeMap interface in the DOM specification.

|

TObject

Description

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.

See also

TDOMNode.Attributes

  

Contains Attribute for the DOM Node.

TDOMDocumentType.Entities

  

Entities declared in the Document Type declaration.

TDOMDocumentType.Notations

  

Notations declared in the Document Type declaration.


Version 3.2 Generated 2024-02-25 Home