Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
When overridden in a derived class, resolves a namespace prefix in the current element's scope.
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Syntax
'Declaration
Public Overridable Function LookupNamespace ( _
prefix As String _
) As String
public virtual string LookupNamespace(
string prefix
)
public:
virtual String^ LookupNamespace(
String^ prefix
)
abstract LookupNamespace :
prefix:string -> string
override LookupNamespace :
prefix:string -> string
public function LookupNamespace(
prefix : String
) : String
Parameters
- prefix
Type: System. . :: . .String
The prefix whose namespace URI you want to resolve. To match the default namespace, pass an empty string.
Return Value
Type: System. . :: . .String
The namespace URI to which the prefix maps or nullNothingnullptrunita null reference (Nothing in Visual Basic) if no matching prefix is found.
Remarks
In the following XML string, if the reader is positioned on the href attribute, the prefix a is resolved by calling reader.LookupNamespace("a"). The returned string is urn:456.
<root xmlns:a="urn:456">
<item>
<ref href="a:b"/>
</item>
</root>
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.