Storing UTF-8 XML using Word's CustomXMLPart or any other supported way

Posted by wpfwannabe on Stack Overflow See other posts from Stack Overflow or by wpfwannabe
Published on 2010-06-05T20:37:07Z Indexed on 2010/06/05 20:42 UTC
Read the original article Hit count: 331

Filed under:
|
|
|
|

I am writing a Word add-in which is supposed to store some own XML data per document using Word object model and its CustomXMLPart. The problem I am now facing is the lack of IStream-like functionality for reading/writing XML to/from a CustomXMLPart. It only provides BSTR interface and I am puzzled how to handle UTF-8 XMLs with BSTRs. To my understanding an UTF-8 XML file should really never have to undergo this sort of Unicode conversion. I am not sure what to expect as a result here.

Is there another way of using Word automation interfaces to store arbitrary custom information inside a DOCX file?

© Stack Overflow or respective owner

Related posts about c++

Related posts about Xml