NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlReader.GetNamespaceOfPrefix

Returns the namespace URI associated with a given prefix.

[Visual Basic]
MustOverride Public Function GetNamespaceOfPrefix( _
   ByVal prefix As String _
) As String
[C#]
public abstract string GetNamespaceOfPrefix(
   string prefix
);
[C++]
public: virtual String* GetNamespaceOfPrefix(
   String* prefix
) = 0;
[JScript]
public abstract function GetNamespaceOfPrefix(
   prefix : String
) : String;

Parameters

prefix
The prefix for which to obtain the namespace URI. This must be a non-null, non-empty string.

Return Value

The namespace URI associated with the given prefix at the current position in the XML input stream, or null if no declaration of the given prefix is in scope.

Exceptions

Exception Type Condition
ArgumentException If prefix is null or an empty string.

Remarks

This method returns the namespace URI that is associated with the given prefix at the current position in the XML input stream. If the reader is positioned on a start tag, the resolution process includes prefixes that are declared in that start tag.

See Also

XmlReader Class | XmlReader Members | System.Xml Namespace