RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IXMLDocument.GeneratePrefix Method

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

Pascal
function GeneratePrefix(const Node: IXMLNode): DOMString;
C++
__fastcall DOMString GeneratePrefix(const IXMLNode Node);

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. 

 

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