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