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

TDOMElement

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

Implements the DOM Element interface from the DOM specification.

Declaration

Source position: laz2_dom.pas line 622

type TDOMElement = class(TDOMNode_NS)

protected

  FAttributes: TDOMNamedNodeMap;

  function GetNodeType; override;

  

Gets the value for the NodeType property.

  function GetAttributes; override;

  

Gets the value for the Attributes property.

  procedure AttachDefaultAttrs;

  

Creates attribute nodes with the default attribute values in a namespaced DOM Element.

  function InternalLookupPrefix();

  

Gets the Namespace Prefix used for the specified Namespace URI.

  procedure RestoreDefaultAttr();

  

Restores the specified default attribute name and value in the DOM Element.

public

  destructor Destroy; override;

  

Destructor for the class instance.

  function CloneNode(); override; overload;

  

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

  function IsEmpty; virtual;

  

Indicates if the DOM Element does not have any content.

  procedure Normalize; override;

  

Performs normalization for Text nodes and Attributes in the DOM Element.

  property TagName: DOMString; [r]

  

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

  function GetAttribute();

  

Gets the value for the AttribStrings property.

  procedure SetAttribute();

  

Sets the value in the AttribStrings property.

  procedure RemoveAttribute();

  

Removes the DOM Attribute with the specified name.

  function GetAttributeNode();

  

Gets the DOM Attribute node with the specified name.

  function SetAttributeNode();

  

Stores the new DOM Attribute node to an existing Attribute with the same name.

  function RemoveAttributeNode();

  

Removes the specified DOM Attribute node from the Attributes for the Element.

  function GetElementsByTagName();

  

Gets a list of DOM nodes with the specified name in the sub-tree for the Element.

  function GetAttributeNS();

  

Gets the value for an Attribute with the specified Namespace URI and local name.

  procedure SetAttributeNS();

  

Sets the value for the DOM Attribute with the specified Namespace URI and qualified name.

  procedure RemoveAttributeNS();

  

Removes the DOM Attribute with the specified Namespace URI and local name.

  function GetAttributeNodeNS();

  

Gets the DOM Attribute node with the specified Namespace URI and local name.

  function SetAttributeNodeNS();

  

Stores the new DOM Attribute node in an existing Namespaced Attribute node.

  function GetElementsByTagNameNS();

  

Gets a Node list with Elements having the specified Namespace URI and local name.

  function hasAttribute();

  

Indicates if the Attributes property contains an item with the specified name.

  function hasAttributeNS();

  

Indicates if Attributes contains an attribute with the specified Namespace URI and local name.

  function HasAttributes; override;

  

Indicates if the Attributes property contains DOM Attribute nodes.

  property AttribStrings []: DOMString; default; [rw]

  

Provides indexed access to Attributes and their value as a String.

end;

Inheritance

TDOMElement

  

Implements the DOM Element interface from the DOM specification.

|

TDOMNode_NS

  

Implements a DOM Node with Namespace support.

|

TDOMNode_WithChildren

  

Extends TDOMNode to allocate storage for child nodes.

|

TDOMNode

  

Implements the DOM Node interface.

|

TObject

Description

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.

See also

TDOMNode_NS

  

Implements a DOM Node with Namespace support.

TDOMNode

  

Implements the DOM Node interface.


Version 3.2 Generated 2024-02-25 Home