} else {
log.warn("No known part after all for CustomXmlPart " + o.getClass().getName());
CustomXmlDataStorage data = Load.getCustomXmlDataStorageClass().factory();
// Copy el into a new document
org.w3c.dom.Document doc = XmlUtils.getNewDocumentBuilder().newDocument();
//XmlUtils.treeCopy(el, doc);
org.w3c.dom.Node copy = doc.importNode(el, true);
// Word doesn't like the xml namespace to be bound. At some point in a process
// from docx -> package-> flatopc -> package -> docx, it is added to the custom xml root element.
try {
copy.getAttributes().removeNamedItemNS("http://www.w3.org/2000/xmlns/","xml");
} catch (DOMException e) {}
doc.appendChild(copy);
data.setDocument(doc);
((org.docx4j.openpackaging.parts.CustomXmlDataStoragePart) part)
.setData(data);
}
} catch (javax.xml.bind.UnmarshalException ue) {
// No ...
CustomXmlDataStorage data = Load.getCustomXmlDataStorageClass().factory();
// Copy el into a new document
org.w3c.dom.Document doc = XmlUtils.getNewDocumentBuilder().newDocument();
//XmlUtils.treeCopy(el, doc);
org.w3c.dom.Node copy = doc.importNode(el, true);
try {
copy.getAttributes().removeNamedItemNS("http://www.w3.org/2000/xmlns/","xml");
} catch (DOMException e) {}
doc.appendChild(copy);
data.setDocument(doc);
((org.docx4j.openpackaging.parts.CustomXmlDataStoragePart) part)
.setData(data);
}