Easy Tutorial
❮ Met Nodemap Removenameditem Dom Prop Node Textcontent ❯

XML DOM prefix Attribute



Definition and Usage

The prefix attribute returns the namespace prefix of the selected element.

If the selected node is not an element or attribute, this property always returns NULL.

Syntax


Example

The following code snippet uses loadXMLDoc() to load "books_ns.xml" into xmlDoc and retrieves the namespace prefix from the first <title> element:

Example

The above code will output:


❮ Met Nodemap Removenameditem Dom Prop Node Textcontent ❯