I try to place an image at the place of a text. I create a new <w:p> element containing image and replace at the place of previous <w:p> image containg text.I generate the output docx and the format looks perfect in a xml editor.The docx does open in Microsoft word and recognizes a blank picture. The actual image does not appear.
If I edit the original w:document manually, it works. dox4j library has added <v:shapetype xmlns=....>, but that is insufficient.
It seems that original document header namespace should have been like -
<w:document xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml">
But it is [Note that xmlns:v is absent]-
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:ns2="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage" xmlns:ns7="http://schemas.openxmlformats.org/schemaLibrary/2006/main">
Is there any way that I can edit w:document xmlns part exclusively?
Thanks.