/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java
target.removeChild( matches.item( i) .item( i) ) ;
target.removeChild ( matches.item ( i ) .childIndex ( ) ) ;
} XMLList matches = target.getPropertyList(xmlName); if (matches.length() == 0) { target.appendChild(xmlValue); } else { for (int i = 1; i < matches.length(); i++) { <extra_id_0> } XML firstMatch = matches.item(0); target.replace(firstMatch.childIndex(), xmlValue); } } }