org.docx4j.openpackaging.parts.CustomXmlDataStoragePart customXmlDataStoragePart =
new org.docx4j.openpackaging.parts.CustomXmlDataStoragePart();
// Defaults to /customXml/item1.xml
CustomXmlDataStorage data = new CustomXmlDataStorageImpl();
data.setDocument(createCustomXmlDocument());
customXmlDataStoragePart.setData(data);
parent.addTargetPart(customXmlDataStoragePart, AddPartBehaviour.RENAME_IF_NAME_EXISTS);
return customXmlDataStoragePart;