Easy Tutorial
❮ Prop Attr Nodename Dom Prop Node Lastchild ❯

XML DOM lookupNamespaceURI() Method



Definition and Usage

The lookupNamespaceURI() method returns the namespace URI that matches the specified prefix on the current node.

Syntax

Parameter Description
prefix Required. A string specifying the prefix to look up.

Example

The following code snippet uses loadXMLDoc() to load "books_ns.xml" into xmlDoc and finds the namespace URI for the "c" prefix in the first <book> element:

Example

Output:

http://www.tutorialpro.org/w3cnote/

❮ Prop Attr Nodename Dom Prop Node Lastchild ❯