N
neousr
<record>
<title>Lunar Park</title>
<author>Bret Easton Ellis</author>
<publisher></publisher>
<year>2005</year>
</record>
xAuthor =
x.getElementsByTagName("author")[0].firstChild.nodeValue
xPublisher =
x.getElementsByTagName("publisher")[0].firstChild.nodeValue
I'm retrieving data from a xml file, and I need to display that data in
a table, but as soon as I try to reference an element that it's empty
the browser stops working...
Is there any way to prevent this (so, to know wich elements are empty
in a certain "record")?
Thanks a lot in advance.
<title>Lunar Park</title>
<author>Bret Easton Ellis</author>
<publisher></publisher>
<year>2005</year>
</record>
xAuthor =
x.getElementsByTagName("author")[0].firstChild.nodeValue
xPublisher =
x.getElementsByTagName("publisher")[0].firstChild.nodeValue
I'm retrieving data from a xml file, and I need to display that data in
a table, but as soon as I try to reference an element that it's empty
the browser stops working...
Is there any way to prevent this (so, to know wich elements are empty
in a certain "record")?
Thanks a lot in advance.