Exporting rulesets to XML
Even though there is an option to import a ruleset from another Visio document, I know that some rules developers would like to export and import rulesets to XML. This allows rulesets to be stored, restored, and analysed more easily.
I decided that the XML structure exported should be the same as the Visio 2013 XML format, and thus use a part of the Visio XML schema. This means using the same namespaces, but it would mean that any XSL stylesheets developed for our export would also work for the validation.xml files found within the zip files that are standard Visio 2013 XML format (*.vsdx
and *.vstx
files).
I decided to include the option to export the issues in a document, too, because someone may have the need to use them in an external program. Having the issues available in XML format means that they could be displayed as a table, for example, so that they can be reviewed independently.
The ExportDocument()
method first constructs a title for SaveFile
dialog,...