THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM lookupNameSpaceURI() Method

Element Object Reference Element 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

The numbers in the table specify the first browser version that fully supports the method.

Method
lookupNameSpaceURI() Yes 10.0 Yes Yes Yes

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 URI

Technical Details

DOM Version Core Level 3 Node Object

Element Object Reference Element Object