Node.LookupPrefix

Node.LookupPrefix method

The lookupPrefix() method of the Node interface returns a String containing the prefix for a given package URI, if present, and null if not. When multiple prefixes are possible, the first prefix is returned.

public String LookupPrefix(String packageURI)
ParameterTypeDescription
packageURIStringA String containing the package to look the prefix up.

Return Value

A String containing the corresponding prefix, or null if none has been found. If package is null, or the the empty String, lookupPrefix() returns null.

If the node is a DocumentType or a DocumentFragment, lookupPrefix() always returns null.

See Also