Page 1 of 1

Multiple unmarshalling issue...

PostPosted: Sat Apr 09, 2011 3:12 am
by Ganesh
Hi Jason,

I am new to docx4j. I am facing this issue, when i am doing to multiple unmarsharlling with two sets hashmap objects for the same wordML object, the null value is getting replaced for the second hashmap key values (Substitution points. e.g. ${Participant_Name} is replaced with null) in the document.
Please help me out on this what mistake i am doing here.

HashMap 1 with some set of key values.

String text1 = XmlUtils.marshaltoString(word.getMainDocumentPart().getJaxbElement, true);
Object obj1 = XmlUtils.unmarshallFromTemplate(text1, map1);
word.getMainDocumentPart().setJaxbElement((Document)obj1);

HashMap 2 with some set of key values.

String text2 = XmlUtils.marshaltoString(word.getMainDocumentPart().getJaxbElement, true);
Object obj2 = XmlUtils.unmarshallFromTemplate(text2, map2);
word.getMainDocumentPart().setJaxbElement((Document)obj2);

Thanks,
Ganesh

Re: Multiple unmarshalling issue...

PostPosted: Sun Apr 10, 2011 4:04 pm
by jason
This sounds like the issue fixed in revision 1367 of Dec 2010.

Please use a more recent nightly build. I'll aim to upload one later today...