Node node = nl.item(i);
if (node.getNodeType() == node.ELEMENT_NODE) {
if ( nodeName.equals(node.getNodeName()) ) {
foundNodes++;
d--;
<BUG>doDebug(d,"< getOrAddChildNode found name="+ nodeToString(node));

doDebug(d,"foundNodes = "+foundNodes+" looking for node="+whichNode);
</BUG>
if ( foundNodes >= whichNode ) return node;

Node node = nl.item(i);
if (node.getNodeType() == node.ELEMENT_NODE) {
if ( nodeName.equals(node.getNodeName()) ) {
foundNodes++;
d--;
if ( DF ) doDebug(d,"< getOrAddChildNode found name="+ nodeToString(node));
if ( DF ) doDebug(d,"foundNodes = "+foundNodes+" looking for node="+whichNode);
if ( foundNodes >= whichNode ) return node;
