I got another issue , after further debug it seems , we are expecting a paragraph for everything means all tags must be inside ><w:p> tag.
In the below word xml I have </w:p><w:bookmarkEnd w:id="0"/><w:p. hence it is looking for paraid and failing.
the exception I am getting is
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,2927]
Message: http://www.w3.org/TR/1999/REC-xml-names ... paraId&w14
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)
at org.docx4j.diff.Differencer.combineAdjacent(Differencer.java:1229)
at org.docx4j.diff.Differencer.diffWorker(Differencer.java:412)
at org.docx4j.diff.Differencer.diff(Differencer.java:302)
at org.docx4j.samples.CompareDocuments.main(CompareDocuments.java:109)
this is happening at int event = reader.next(); in Differencer.java
any help is appreciated.
sample Word xml document:
<w:body><w:p w14:paraId="7CB3A7FC" w14:textId="77777777" w:rsidR="00FA38E0" w:rsidRPr="00FA38E0" w:rsidRDefault="00FA38E0" w:rsidP="00FA38E0"><w:pPr><w:spacing w:before="100" w:beforeAutospacing="1" w:after="100" w:afterAutospacing="1"/><w:rPr><w:b/><w:bCs/><w:color w:val="FF0000"/><w:sz w:val="20"/><w:szCs w:val="20"/><w:u w:val="single"/></w:rPr></w:pPr><w:bookmarkStart w:id="0" w:name="_GoBack"/><w:r w:rsidRPr="00FA38E0"><w:rPr><w:b/><w:bCs/><w:color w:val="FF0000"/><w:sz w:val="20"/><w:szCs w:val="20"/><w:u w:val="single"/></w:rPr><w:t xml:space="preserve">Summary: </w:t></w:r></w:p><w:bookmarkEnd w:id="0"/><w:p w14:paraId="134065C3" w14:textId="77777777" w:rsidR="00FA38E0" w:rsidRDefault="00FA38E0" w:rsidP="00FA38E0"><w:pPr><w:pStyle w:val="NormalWeb"/><w:shd w:val="clear" w:color="auto" w:fill="FFFFFF"/></w:pPr><w:r><w:rPr><w:color w:val="000000"/><w:sz w:val="20"/><w:szCs w:val="20"/></w:rPr><w:t>We are currently looking for a Senior Java Developer .This person will work with project teams on their designs to ensure effective implementation of Integration projects, which include full lifecycle design, development, and maintenance of integration interfaces in a SOA environment. Consults and collaborates with a team of senior subject matter experts, enterprise architects, solution architects and security architects in defining the overall integration approaches.</w:t></w:r></w:p>