X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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

Internet Explorer Firefox Opera Google Chrome Safari

The lookupNamespaceURI() method is supported in all major browsers.

Note: Internet Explorer 9 and earlier does not support this method.


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


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook