WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
MainDocumentPart mdp = wordMLPackage.getMainDocumentPart();
// Styles part
StyleDefinitionsPart sdp = mdp.getStyleDefinitionsPart();
Styles styles = (Styles)XmlUtils.unmarshalString(stylesXML);
sdp.setJaxbElement(styles);
// Theme part
ThemePart themePart = new ThemePart();
Theme theme = (Theme)XmlUtils.unmarshalString(themeXML);
themePart.setJaxbElement(theme);