Search w3schools.com:

SHARE THIS PAGE

DOM Node lookupNameSpaceURI() Method

Node Object Reference Node Object

The following code fragment uses the xml file: "bookstore.xml".

Example

Return the namespace URI of the specified prefix:

xmlDoc.documentElement.lookupNamespaceURI("c");

The output of the code above will be:

http://www.w3schools.com/children/

Try it yourself »

Definition and Usage

The lookupNameSpaceURI() method returns the namespace URI of the specified prefix for the specified node.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The lookupNamespaceURI() method is supported in all major browsers, except Internet Explorer.


Syntax

node.lookupNamespaceURI(prefix)

Parameters

Parameter Type Description
prefix String Required. Specifies the prefix of the namespace you want to find

Return Value

Type Description
String The namespace prefix

Technical Details

DOM Version Core Level 3


Node Object Reference Node Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]