Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

XmlWriter.LookupPrefix Method

When overridden in a derived class, returns the closest prefix defined in the current namespace scope for the namespace URI.

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

Parameters

ns
The namespace URI whose prefix you want to find.

Return Value

The matching prefix or a null reference (Nothing in Visual Basic) if no matching namespace URI is found in the current scope.

Exceptions

Exception Type Condition
ArgumentException ns is either a null reference (Nothing in Visual Basic) or String.Empty.

Example

See LookupPrefix (in the XmlTextWriter class) for an example using this method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlWriter Class | XmlWriter Members | System.Xml Namespace

Show:
© 2015 Microsoft