Easy Tutorial
❮ Prop Text Data Dom Met Node Comparedocumentposition ❯

XML DOM localName Property



Definition and Usage

The localName property returns the local part of the node name.

Syntax


Example

The following code snippet uses loadXMLDoc() to load "books.xml" into xmlDoc and returns the local name of the <title> element:

Example

xmlDoc=loadXMLDoc("books_ns.xml");

x=xmlDoc.getElementsByTagName('title');

for(i=0;i&lt;x.length;i++)
{
  document.write(x.item(i).localName);
  document.write("");
}

The above code will output:


❮ Prop Text Data Dom Met Node Comparedocumentposition ❯