Thanks for jason's grateful help! i have completed the xhtml importing using content control, and summarized the process as follows, maybe helpful for someone else:
1. download and install opendope plugin for word from
http://www.opendope.org/downloads/authoring-friendly/setup.exe.
2. create a new docx file, 'dj.docx', e.g.
3. in the ribbon-template manager, click 'show xml', choose 'copy the contents of an existing xml file to create', 'sample.xml', e.g. (noted that, this sample xml will be replaced later by an external file with the same schema, and the element must contain escaped xhtml which will be used by setting xpath in step 4).
4. in the ribbon-template manager, click 'add xpath', input the xpath '/journal/dj1' which we want to bind the content control, then save word and exit.
5. create an external xml file , which may come from db, 'journal.xml', e.g. run the sample code 'sample.java'.
in addition, since the steps above maybe a little geek for my clients who rarely know about programming, so the only thing i suppose the clients need to do is create the content control using word's 'development tools' in the ribbon rather than the opendope, then name these control with predefined values. after the clients upload these docx file, my program will do the following things:
1. create a custom xml part and its data storage part, referring to sample code 'ContentControlsAddCustomXmlDataStoragePart.java'.
2. create xpath binding part with predefined values
3. create an initial xml data with escaped xhtml by CustomXmlDataStorage's setDocument().
4. find the content control according to its name and set it's xpath id with values defined in step 2.
my question is how can i finish the step 2 & 4 and is there any api in docx4j? thanks again!