Design and Formatting Best Practices for OpenXML Files
People,
We used the OpenXml APIs found in System.IO.Packaging to create a package file that contains some Xml / Binary files, so the package looks like this:
Package/
-/DataFolder1/an xml file.xml
-/DataFolder2/another xml file.xml
-/Bin/other binar files
This was used for version 1.0 of the app and it is going well.
We are in the planning phase for V2 awaiting the following changes to the package structure:
-
there may be additional files in the package
-
there may be some changes to the Xml schema of existing files (example ... new nodes)
- there may be some changes in the Xml schema of existing files (example ... deleting nodes or changing data type)
I would appreciate any advice based on real life situations that can help find the reverse / forward computational power between file formats and the application itself, so we can have both one application and its file format independently of each other.
a source to share
Without knowing your application, it's hard for you to advise. However, different versions of custom XML can be handled by adding an attribute containing the version number, or - if significant changes have been made to the schema - by changing the namespace to contain the new version number.
If you want to take a look at how OpenXML itself deals with versioning and extensibility, I suggest you read part 5 of the OpenXML specification:
Office Open XML - Part 5: Markup Compatibility and Extensibility
a source to share