L
Learner
When I execute this script with the xml document placed below it . It
fails. Can Anyonw tell me the cause of it.
var root=xmlDoc.documentElement
var temp8 =
xmlDoc.getElementsByTagNameNS('http://www.tryit.com/fiction','title')
temp8 = temp8.item(0);
if(temp8.nodeName == "d:title")
{
return success;
}
else
{
return fialure;
}
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <bookstore>
- <book xmlns:d="http://www.tryit.com/fiction" category="FICTION">
<d:title d:lang="en">The Alchemist</d:title>
<d:author>Paulo Coelho</d:author>
<d:year>2005</d:year>
<d
rice>130.00</d
rice>
</book>
- <book xmlns:c="http://www.tryit.com/children" category="CHILDREN">
<c:title c:lang="en">Harry Potter</c:title>
<c:author>J K. Rowling</c:author>
<c:year>2005</c:year>
<c
rice>429.5</c
rice>
</book>
</bookstore>
Thanks in Advance
Regards
Ankush
fails. Can Anyonw tell me the cause of it.
var root=xmlDoc.documentElement
var temp8 =
xmlDoc.getElementsByTagNameNS('http://www.tryit.com/fiction','title')
temp8 = temp8.item(0);
if(temp8.nodeName == "d:title")
{
return success;
}
else
{
return fialure;
}
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <bookstore>
- <book xmlns:d="http://www.tryit.com/fiction" category="FICTION">
<d:title d:lang="en">The Alchemist</d:title>
<d:author>Paulo Coelho</d:author>
<d:year>2005</d:year>
<d
</book>
- <book xmlns:c="http://www.tryit.com/children" category="CHILDREN">
<c:title c:lang="en">Harry Potter</c:title>
<c:author>J K. Rowling</c:author>
<c:year>2005</c:year>
<c
</book>
</bookstore>
Thanks in Advance
Regards
Ankush