Sign in Join
FPDoc Onlineexperiment

Laz2_DOM unit

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

laz2_dom.pas is part of the lazutils package.

Classes and records

EDOMErrorclassBase class for exceptions raised in DOM interface classes.
EDOMHierarchyRequestclassException raised when an inserted node is not valid for the Document Object Model (DOM).
EDOMIndexSizeclassException raised for an invalid index size.
EDOMInUseAttributeclassException raised when adding an attribute that is already in use.
EDOMInvalidAccessclassException raised when a parameter or operation is not supported by the object.
EDOMInvalidModificationclassException raised when an attempt was made to modify the type for an object.
EDOMInvalidStateclassException raised when accessing an object that is no longer usable.
EDOMNamespaceclassException raised when an object is changed in a way that is invalid for its Namespaces.
EDOMNotFoundclassException raised when a node is accessed in a context where it does not exist.
EDOMNotSupportedclassException raised when the DOM implementation does not support the requested object type or operation.
EDOMSyntaxclassException raised when an invalid or illegal value is specified for a DOM object.
EDOMWrongDocumentclassException raised when a node is used in a document other than the one that created it.
TDOMAttrclassImplements a DOM Node for attributes with Namespace support.
TDOMAttrDefclassImplements the default attribute node introduced in DOM Level 2.
TDOMCDATASectionclassImplements the DOM CDataSection interface from the DOM specification.
TDOMCharacterDataclassImplements the CharacterData interface from the DOM specification.
TDOMCommentclassImplements the DOM Comment interface from the DOM specification.
TDOMDocumentclassImplements the DOM Document interface.
TDOMDocumentFragmentclassImplements the DocumentFragment interface from the DOM specification.
TDOMDocumentTypeclassImplements the DOM DocumentType interface from the DOM specification.
TDOMElementclassImplements the DOM Element interface from the DOM specification.
TDOMElementListclassProvides a recursive list of DOM Elements.
TDOMEntityclassImplements the DOM Entity interface from the DOM specification.
TDOMEntityReferenceclassImplements the DOM EntityReference interface from the DOM specification.
TDOMImplementationclassImplements the DOMImplementation interface from the DOM specification.
TDOMNamedNodeMapclassImplements the NamedNodeMap interface in the DOM specification.
TDOMNodeclassImplements the DOM Node interface.
TDOMNode_NSclassImplements a DOM Node with Namespace support.
TDOMNode_WithChildrenclassExtends TDOMNode to allocate storage for child nodes.
TDOMNodeAllChildEnumeratorclassImplements an enumerator that visits all Children in the sub-tree for a DOM node.
TDOMNodeEnumeratorclassImplements an enumerator for DOM Nodes.
TDOMNodeListclassImplements an ordered list of DOM Nodes.
TDOMNotationclassImplements the DOM Notation interface from the DOM specification.
TDOMProcessingInstructionclassImplements the DOM ProcessingInstruction interface from the DOM specification.
TDOMTextclassImplements the DOM Text interface from the DOM specification.
TExtentrecordRecord type with a pointer to its extent, followed by an array TDOMNode instances.
TNamespaceInforecordRepresents Namespace Information used in DOM Node specializations.
TNodePoolclassProvides custom memory management when DOM Nodes are created.
TXMLDocumentclassImplements an XML Document.

Procedures and functions

EncodeLesserAndGreaterThanfunctionConverts instance of the reserved characters.
StrToXMLValuefunctionConverts a string to it representation as XML character data.
XMLValueToStrfunctionConverts XML character data to its representation as a string value.

Types

DOMChartypeType used for Char values in DOM interfaces.
DOMPChartypeType used for Pointers to Char values in DOM interfaces.
DOMStringtypeType used for String values in DOM interfaces.
PDOMStringtypeType used for Pointers to DOMString values.
PExtenttypePointer to a TExtent type.
PNodePoolArraytypePointer to a TNodePoolArray instance.
TAttrDataTypeenumerationEnumeration with values for attribute types used in DOM Nodes.
TAttrDefaultenumerationEnumerated type with methods for getting the attribute node value.
TDOMNodeClasstypeClass type used to create TDOMNode instances.
TFilterResultenumerationDetermines the Node types included in a DOM node list.
TNamespacestypeType used for namespaces in a DOM Document.
TNodeFlagEnumenumerationEnumeration with flag values for DOM Nodes.
TNodeFlagssetSet type used to store TNodeFlagEnum values.
TNodePoolArraytypeSpecifies an array of TNodePool instances.

Constants

ATTRIBUTE_NODEconstantRepresents the node type for DOM Attributes.
CDATA_SECTION_NODEconstantRepresents the node type for DOM CDATA nodes.
COMMENT_NODEconstantRepresents the node type for DOM Comments.
DOCUMENT_FRAGMENT_NODEconstantRepresents the node type for DOM Document Fragments.
DOCUMENT_NODEconstantRepresents the node type for DOM Document Elements.
DOCUMENT_TYPE_NODEconstantRepresents the node type for DOM Document Type Declarations (DTD).
DOMSTRING_SIZE_ERRconstantRepresents DOM exception code 2.
ELEMENT_NODEconstantRepresents the node type for DOM Elements.
ENTITY_NODEconstantRepresents the node type for DOM Entities.
ENTITY_REFERENCE_NODEconstantRepresents the node type for DOM Entity References.
HIERARCHY_REQUEST_ERRconstantRepresents DOM exception code 3.
INDEX_SIZE_ERRconstantRepresents DOM exception code 1.
INUSE_ATTRIBUTE_ERRconstantRepresents DOM exception code 10.
INVALID_ACCESS_ERRconstantRepresents DOM exception code 15.
INVALID_CHARACTER_ERRconstantRepresents DOM exception code 5.
INVALID_MODIFICATION_ERRconstantRepresents DOM exception code 13.
INVALID_STATE_ERRconstantRepresents DOM exception code 11.
NAMESPACE_ERRconstantRepresents DOM exception code 14.
NO_DATA_ALLOWED_ERRconstantRepresents DOM exception code 6.
NO_MODIFICATION_ALLOWED_ERRconstantRepresents DOM exception code 7.
NOT_FOUND_ERRconstantRepresents DOM exception code 8.
NOT_SUPPORTED_ERRconstantRepresents DOM exception code 9.
NOTATION_NODEconstantRepresents the node type for DOM Notation Declarations.
PROCESSING_INSTRUCTION_NODEconstantRepresents the node type for DOM Processing Instructions.
stduri_xmlconstantNamespace URI for the xml prefix.
stduri_xmlnsconstantNamespace URI for the xmlns prefix.
SYNTAX_ERRconstantRepresents DOM exception code 12.
TEXT_NODEconstantRepresents the node type for DOM Text nodes.
WRONG_DOCUMENT_ERRconstantRepresents DOM exception code 4.

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.