root.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + entry.getValue(), entry.getKey());
}
}
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DOMXSImplementationSourceImpl dis = new org.apache.xerces.dom.DOMXSImplementationSourceImpl();
DOMImplementationLS impl = (DOMImplementationLS) dis.getDOMImplementation("LS");
LSSerializer writer = impl.createLSSerializer();
LSOutput output = impl.createLSOutput();
output.setByteStream(baos);
writer.write(dom, output);
return baos.toByteArray();