Breyta

Deila með


XPathNavigator.LookupPrefix(String) Method

Definition

Gets the prefix declared for the specified namespace URI.

public:
 virtual System::String ^ LookupPrefix(System::String ^ namespaceURI);
public virtual string? LookupPrefix (string namespaceURI);
public virtual string LookupPrefix (string namespaceURI);
abstract member LookupPrefix : string -> string
override this.LookupPrefix : string -> string
Public Overridable Function LookupPrefix (namespaceURI As String) As String

Parameters

namespaceURI
String

The namespace URI to resolve for the prefix.

Returns

A String that contains the namespace prefix assigned to the namespace URI specified; otherwise, Empty if no prefix is assigned to the namespace URI specified. The String returned is atomized.

Implements

Remarks

The LookupPrefix method returns the first prefix that matches the namespace URI specified. Multiple prefixes referring to the same namespace URI are not ordered in any particular way, so a particular prefix may not be returned each time when more than one is assigned.

Note

Namespace URI to prefix mappings can change from node to node in an XML document. As a result, the value of the LookupPrefix method may not be consistent from one node to the next.

Applies to