I have a Word 2003 document saved as a XML in WordProcessingML format. It contains few placeholders which will be dynamically replaced by an appropriate content. But, the problem is that Word seemingly randomly splits them in the separate words. For example, instead of this:
<w:t>${dl.d.out.ecs_rev}</w:t>
I have this:
...
<w:t>${</w:t>
</w:r>
<w:r wsp:rsidR="005D11C0">
<w:rPr>
<w:sz w:val="20" />
<w:sz-cs w:val="20" />
</w:rPr>
<w:t>dl.</w:t>
</w:r>
<w:r wsp:rsidRPr="00696324">
<w:rPr>
<w:sz w:val="20" />
<w:sz-cs w:val="20" />
</w:rPr>
<w:t>d.out.ecs_rev}</w:t>
...
Is there any way to save a "clean" XML document using Word 2003, or is there any existing solution which can do the cleaning?
I tried to program a method in Java which will concatenate separated parts of the placeholders, but because the number of different cutting combinations is relatively big, the algorithm for that is far more complex than a original task that I have to do, so it is problem for itself.