Xml.xmldom.IDOMNode.prefix

From RAD Studio API Documentation
Jump to: navigation, search


Delphi

property prefix: DOMString read get_prefix;                     { DOM Level 2 }

C++

__property System::UnicodeString prefix = {read=_scw_get_prefix};

Properties

Type Visibility Source Unit Parent
property public
Xml.Xmldom.pas
Xml.xmldom.hpp
Xml.xmldom IDOMNode

Description

Indicates the namespace prefix for the node.

Read prefix to determine the namespace prefix for an element or attribute node.

For element nodes, prefix is derived from the name that appears in the XML tag. For example, the prefix for <xsi:Name First=John Last=Doe> is 'xsi'.

For attribute nodes, prefix is derived from the string that appears to the left of the equals sign in the attribute declaration. For example, with the element <xsi:Name xsi:First=John xsi:Last=Doe>, both attribute nodes have the prefix of 'xsi'. Attribute nodes do not inherit a prefix value from the element node to which they are attached. For example, with the element <xsi:Name First=John Last=Doe>, both attributes have a prefix of nil (Delphi) or NULL (C++).

For any other node types, prefix 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: prefix 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.

See Also