I am completely new to docx4j. my project requirement is as follows. We have a docx template which has many place holders to be substitued thro UI application. I created a map to hold all the placeholders as key value pair. I reffered the UnmarshallfromTemplate sample and did the replacing with this sample code. I tried with 2 strings and it got replaced perfectly. My template has 2 or 3 font colors. I tried to replace the entire template with the string values but certain place holders where not getting replaced.. it had value as null instead of the replacing string value. i went through the "Getting started" guide and discovered that font colors, grammer etc will split the keys into different runs. When all the font color was same my replace method works fine.
I wanted to try with the content control xml binding. many people have created the custom xml with the tool kit. but we are not supposed to use the content control tool kit. My question is through the docx4j in java how do i create the custom xml for the existing template without using the toolkit. or how to bind the custom xml with my template to replace the place holders. Iwent through the sample which had medicalChartSample.docx but my customXmlDataStorage for the given itemId is null since i dont have the custom xml when i change the extension of docx to zip. Can you please help me with this issue.