/src/main/java/org/htmlunit/util/XmlUtils.java
parent.appendChild( childXml) ; final DomNode childXml = createFrom( page, child, handleXHTMLAsHTML, attributesOrderMap) ;
final DomNode childXml = createFrom ( page, child, handleXHTMLAsHTML, attributesOrderMap ) ; parent.appendChild ( childXml ) ;
final DocumentType documentType = child.getOwnerDocument().getDoctype(); if (documentType != null && page instanceof XmlPage) { final DomDocumentType domDoctype = new DomDocumentType( page, documentType.getName(), documentType.getPublicId(), documentType.getSystemId()); ((XmlPage) page).setDocumentType(domDoctype); } <extra_id_0> copy(page, child, childXml, handleXHTMLAsHTML, attributesOrderMap); } 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());