RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IXMLNode.LocalName Property

Indicates the name of the node without any namespace prefix.

Pascal
property LocalName: DOMString;
C++
__property DOMString LocalName;

Read LocalName to determine the local name of the underlying DOM node. LocalName is only defined for nodes of type ntElement or ntAttrribute. 

For element nodes, LocalName is derived from the name that appears in the XML tag. For example, the local name for <xsi:Name First="John" Last="Doe"> is 'Name'. (The string "xsi" is called the prefix). 

For attribute nodes, the local name is derived from the string that appears to the left of the equals sign in the attribute declaration. For example, the element <xsi:Name xsi:First="John" xsi:Last="Doe"> results in two attribute nodes, with the local names 'First' and 'Last'. 

For any other node types, localName is nil (Delphi) or NULL (C++). 

To get the name of a node when localName is not defined, use the NodeName property instead. If the node's name has no namespace prefix, LocalName has the same value as NodeName

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!