XML DOM localNameProperty
Node object
Definition and Usage
The localName property returns the local part of the node name.
Syntax
nodeObject.localName
Example
The following code snippet usesloadXMLDoc()put "books.xmlLoad into xmlDoc, and return the local name of the <title> element:
Example
xmlDoc=loadXMLDoc("books_ns.xml");
x=xmlDoc.getElementsByTagName('title');
for(i=0;i<x.length;i++)
{
document.write(x.item(i).localName);
document.write("");
}
The above code will output:
title
title
title
Try it Yourself »
Node objectother extensions