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

HTML DOM lookupPrefix() Method

Element Object Reference Element Object

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

Example

Return the prefix of the specified namespace:

xmlDoc.documentElement.lookupPrefix("http://www.w3schools.com/children/");

The result will be:

c

Try it yourself »


Definition and Usage

The lookupPrefix() method returns the prefix of the specified namespace URI.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

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


Syntax

node.lookupPrefix(namespaceURI)

Parameters

Parameter Type Description
namespaceURI String Required. Specifies the URI of the specified namespace

Return Value

Type Description
String The prefix of the specified namespace

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