Comment 12 for bug 641278

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

And why not changing this:
if (xml.item(1).getChildNodes().item(1) != null) {
 NodeList places = xml.item(1).getChildNodes();
into this:
if (xml.item(0).getChildNodes().item(1) != null) {
 NodeList places = xml.item(0).getChildNodes();
?
This actually works ;)
It looks like the list begins at 0!
Cf the documentation:
"The items in the NodeList are accessible via an integral index, starting from 0."
I don't know why but the second item() does not like begining at 0.