Node Object
The lookupPrefix() method returns the prefix matching the specified namespace URI on a node.
| Parameter | Description |
|---|---|
| URI | Required. The namespace URI |
The following code fragment loads "books_ns.xml" into xmlDoc using loadXMLDoc() and finds the prefix for the namespace URI in the first <book> element:
Output:
Node Object
Your message has been sent to W3Schools.