Xml.XMLDoc.TXMLNode.GetText

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetText: DOMString;

C++

System::UnicodeString __fastcall GetText();

Properties

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

Description

Returns the text value of the node.

Use the TXMLNode object's IXMLNode interface to call the protected GetText method. GetText returns the text of the node. For example, if the node represents an XML fragment such as

<Title> Understanding XML </Title>

GetText returns the string 'Understanding XML'.

GetText is intended for use when the GetIsTextElement method returns true. If GetIsTextElement returns false, GetText returns an empty string if the node has no children, otherwise it raises an exception.

See Also