Is openxml option entirely in text format?
I tried to create "Hello World" using openxml sdk. To my surprise, when trying to open an XML document, it was not a pure text format, but it does contain some ugly binaries.
Is there an option to have a text format when the content is just text?
I don't see any rationale for the binary part if it's supposedly "open".
Update: my mistake I didn't know the docx was just a zip file. If I unzip it I get the open xml format. So Openxml is really open.
source to share
The OpenXML format is an archive file (more precisely a ZIP file) with XML and XML metadata and binary content.
This makes sense since it is quite difficult to use binary data like images, sounds, embedded objects, etc. in textual XML. The "open" in the title comes from MS Marketing and because the format is standardized and well documented.
Take a look at the System.IO.Packaging namespace , you will find everything you need to create, read and modify OpenXML packages.
source to share
OpenXML is not pure text. If your file is plain text, save it as a text file.
This can be done with System.IO.File.WriteAllText
.
source to share