Xml.XMLDoc.TXMLNode.DeclareNamespace

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DeclareNamespace(const Prefix, URI: DOMString);

C++

void __fastcall DeclareNamespace(const System::UnicodeString Prefix, const System::UnicodeString URI);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Xml.XMLDoc.pas
Xml.XMLDoc.hpp
Xml.XMLDoc TXMLNode

Description

Adds an attribute to the node that declares a specified namespace URI.

Use the TXMLNode object's IXMLNode interface to call the protected DeclareNamespace method. DeclareNamespace adds an attribute to this node that declares the specified namespace URI as the value of the specified prefix.

Prefix is the namespace prefix that appears in tag names that reference the namespace.

URI is the corresponding namespace URI.

Note: This method is called automatically for newly created nodes when the document's Options property includes doNamespaceDecl.

See Also