Xml.XMLDoc.CreateDOMNode

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CreateDOMNode(Doc: IDOMDocument; const NameOrData: DOMString;
NodeType: TNodeType = ntElement; const AddlData: DOMString = ''): IDOMNode;

C++

extern DELPHI_PACKAGE Xml::Xmldom::_di_IDOMNode __fastcall CreateDOMNode(Xml::Xmldom::_di_IDOMDocument Doc, const System::UnicodeString NameOrData, Xml::Xmlintf::TNodeType NodeType = (Xml::Xmlintf::TNodeType)(0x1), const System::UnicodeString AddlData = System::UnicodeString());

Properties

Type Visibility Source Unit Parent
function public
Xml.XMLDoc.pas
Xml.XMLDoc.hpp
Xml.XMLDoc Xml.XMLDoc

Description

Creates a new DOM node and returns its interface.

CreateDOMNode generates a new DOM node.

Doc is the DOM interface for the document to which the new node will belong.

NameOrData provides the tag name or value of the newly created node. Its interpretation depends on the type of node created, as indicated in the following table:



NodeType NameOrData

ntElement

The tag name.

ntAttribute

The attribute name.

ntText

The value of the node.

ntCData

The value of the CDATA section.

ntEntityRef

The name of the referenced entity.

ntProcessingInstr

The target of the processing instruction.

ntComment

The value (text) of the comment.

ntDocFragment

Not used.



NodeType indicates the type of node to create. It can only be one of the types listed in the previous table.

The meaning of AddlData depends on the node type, as indicated in the following table:



NodeType AddlData

ntElement

The namespace URI that qualifies the tag name.

ntAttribute

The namespace URI that qualifies the attribute name.

ntProcessingInstr

The content of the processing instruction, except for the target.



CreateDOMNode returns the interface for the newly created DOM node.

See Also