From http://www.w3schools.com (Copyright Refsnes Data)
Complete Element Object Reference
The lookupNamespaceURI() method returns the namespace matching the specified prefix on the current node.
| elementNode.lookupNamespaceURI(prefix) |
| Parameter | Description |
|---|---|
| prefix | Required. A string that specifies prefix to find |
The following code fragment loads "books_ns.xml" into xmlDoc using loadXMLDoc() and finds the namespace URI for the "c" prefix in the first <book> element:
Example
Output:
Try it yourself » |
Complete Element Object Reference
From http://www.w3schools.com (Copyright Refsnes Data)