Xml.XMLIntf.IXMLDocument.GeneratePrefix

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GeneratePrefix(const Node: IXMLNode): DOMString;

C++

virtual System::UnicodeString __fastcall GeneratePrefix(const _di_IXMLNode Node) = 0 ;

Properties

Type Visibility Source Unit Parent
function public
Xml.XMLIntf.pas
Xml.XMLIntf.hpp
Xml.XMLIntf IXMLDocument

Description

Generates a unique namespace prefix that can be used for a node in the document.

The AddChild method for each node allows the caller to specify that the new node should use an automatically-generated namespace prefix. When this option is specified, the node calls GeneratePrefix to generate a unique string to act as a namespace prefix.

Node is the interface for the node which will use the newly-generated namespace prefix.

GeneratePrefix returns a unique string that is not already used in the document to represent a namespace URI. The generated namespace prefixes are only unique within a single document.

See Also