|
Dear Webmasters,
I have a problem with the process of an XML file, where the tag has no content.
Example of the XML code
<c></c>
The tag exists, but has no data between it.
Firefox error console returns ' Child node has no properties'
The Javascript line is, .
if (xml.getElementsByTagName("c")[a].childNodes[0].length>0) {xc=xml.getElementsByTagName("c")[a].childNodes[0].nodeValue;} else {xc=''}
I am trying to get my script to test if it is empty, but I do not know how to do it.
Must I always ensure that the tag has at least one space within it?
|