XML DOM localName Property
Node object
Definition and Usage
The localName property returns the local part of a node's name.
Syntax
nodeObject.localName
Example
The following code snippet uses loadXMLDoc() to load "books.xml" Load into xmlDoc, and return the
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 code above will output:
title
title
Try it »
Node object