The following code fragment uses the xml file: "bookstore.xml".
Return the namespace URI of the specified prefix:
The output of the code above will be:
The lookupNameSpaceURI() method returns the namespace URI of the specified prefix for the specified node.
![]()
The lookupNamespaceURI() method is supported in all major browsers, except Internet Explorer.
| Parameter | Type | Description |
|---|---|---|
| prefix | String | Required. Specifies the prefix of the namespace you want to find |
| Type | Description |
|---|---|
| String | The namespace prefix |
| DOM Version | Core Level 3 |
|---|
Node Object
Your message has been sent to W3Schools.