Skip to content

LookupPrefix

Returns the prefix associated with the specified namespace URI.

1
myXml.LookupPrefix(namespace: string):string

Parameters

string namespace
    Namespace URI to look up.

Returns

The prefix associated with the namespace URI, or null if the namespace is not found.

Examples

Look up the prefix of a namespace

1
var prefix = $Xml.LookupPrefix('http://tempuri.org/');    // 'tmp' after AddNamespace('tmp', ...)