/src/main/java/org/htmlunit/util/XmlUtils.java
copy( page, child, childXml, handleXHTMLAsHTML) ;
copy ( page, child, childXml, handleXHTMLAsHTML, attributesOrderMap ) ;
final DomDocumentType domDoctype = new DomDocumentType( page, documentType.getName(), documentType.getPublicId(), documentType.getSystemId()); ((XmlPage) page).setDocumentType(domDoctype); } final DomNode childXml = createFrom(page, child, handleXHTMLAsHTML, attributesOrderMap); parent.appendChild(childXml); <extra_id_0> } private static DomNode createFrom(final SgmlPage page, final Node source, final boolean handleXHTMLAsHTML, final Map<Integer, List<String>> attributesOrderMap) { if (source.getNodeType() == Node.TEXT_NODE) { return new DomText(page, source.getNodeValue()); }