Soap.WSDLItems.TWSDLItems.CompareName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CompareName(const NodeName: DOMString;
const OtherName: DOMString;
const TNS: DOMString = ''): Boolean;

C++

bool __fastcall CompareName(const System::UnicodeString NodeName, const System::UnicodeString OtherName, const System::UnicodeString TNS = System::UnicodeString());

Properties

Type Visibility Source Unit Parent
function public
Soap.WSDLItems.pas
Soap.WSDLItems.hpp
Soap.WSDLItems TWSDLItems

Description

Indicates whether two node names refer to the same element.

Call CompareName to compare the names of two nodes to determine whether they match. CompareName compares the node names, taking into account any namespace prefix added to the node names. CompareName uses the namespace prefix to look up the corresponding namespace URI. If either node name does not have a namespace prefix, CompareName uses the TargetNamespace property for the first node name, and the supplied namespace for the second. CompareName can find a match between two node names that have different namespace prefixes, as long as both prefixes map to the same namespace URI.

NodeName and OtherName are the two node names to compare.

TNS is the target namespace for OtherName. If this is a nonempty string, it is used to replace the namespace of OtherName. If it is an empty string, OtherName uses the namespace associated with its namespace prefix, or the TargetNamespace property if it has no namespace prefix.

CompareName returns true if the two names match, false if they differ (either in the local name, or in the namespace to which the names belong).

See Also