XML DOM localName property
Definition and Usage
localName property returns the local part of the node name.
grammar
nodeObject.localName
Examples
The following code fragment uses loadXMLDoc () to " the Books.xml " into xmlDoc and returns the local name <title> element:
Examples
xmlDoc=loadXMLDoc("books_ns.xml");
x=xmlDoc.getElementsByTagName('title');
for(i=0;i<x.length;i++)
{
document.write(x.item(i).localName);
document.write("
");
}
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"
Node objects