RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IDOMNode.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 name of the DOM node with any namespace prefix stripped away.  

The localName property is only defined for element nodes and attribute nodes (nodes with nodeType ELEMENT_NODE and ATTRIBUTE_NODE).  

For element nodes, the local name 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'. 

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 <Name First=John 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++).

Note: If the prefix and localName properties are defined for a node, nodeName is the combination of those two values.
Note: localName is nil (Delphi) or NULL (C++) for nodes created with a DOM level 1 interface such as the document's createElement method, even if they are element or attribute nodes.
 

 

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