Xml.XMLDoc.TXMLNode.GetIsTextElement

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetIsTextElement: Boolean;

C++

bool __fastcall GetIsTextElement();

Properties

Type Visibility Source Unit Parent
function protected
Xml.XMLDoc.pas
Xml.XMLDoc.hpp
Xml.XMLDoc TXMLNode

Description

Indicates whether the node has a single text value.

Use the TXMLNode object's IXMLNode interface to call the protected GetIsTextElement method. GetIsTextElement returns true if the node represents an XML fragment such as

<Title> Understanding XML </Title>

where the node has a tag name (in this case Title) and a single text value (in this case 'Understanding XML').

GetIsTextElement returns false if the node is any other type of node.

Note: In the underlying DOM implementation, nodes for which GetIsTextElement is true are element nodes that have a single child node that is a text node. TXMLNode flattens this out so that the child text node does not appear as a child node. Instead, the text can be accessed through the GetText method.

See Also