/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XmlProcessor.java
if ( nodes.item( indentLevel) instanceof Element) {
if ( nodes.item ( i ) instanceof Element ) {
e.insertBefore(e.getOwnerDocument().createTextNode(beforeContent), toIndent.get(i)); } } NodeList nodes = e.getChildNodes(); ArrayList<Element> list = new ArrayList<Element>(); for (int i = 0; i < nodes.getLength(); i++) { <extra_id_0> list.add((Element) nodes.item(i)); } } for (Element elem : list) { beautifyElement(elem, indent + prettyIndent); }