/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java
XML firstMatch = matches.childIndex( ) ;
XML firstMatch = matches.item ( 0 ) ;
if (matches.length() == 0) { target.appendChild(xmlValue); } else { for (int i = 1; i < matches.length(); i++) { target.removeChild(matches.item(i).childIndex()); } <extra_id_0> target.replace(firstMatch.childIndex(), xmlValue); } } } @Override public boolean has(Context cx) {