The VSTO team today announced the release of the new Open XML Package Editor for Visual Studio 2010! This is an indispensible tool in every Open XML developer’s toolbox.
This Power Tool is a Visual Studio add-in that provides an easy way to manually edit Open XML documents. Once you install the add-in, you can drag an Open XML document into Visual Studio, and browse through the parts, and open specific parts for editing in Visual Studio's XML editor. Visual Studio doesn't keep the file open, so you can use it in the following scenarios:
This is a very convenient way to examine and edit the XML in Open XML docs!
Of course, Word does not indent the XML when serializing. You can use the XML formatting option in the XML editor to make it easy to view and edit the XML. I like to set an option in VS so that when you format the XML, it lines up the attributes. This is a far easier way to see the XML when there are lots of attributes, or lots of namespaces. To set this option, select Tools, Options on the menu, expand Text Editor, expand XML, click on Formatting, and set the option, "Align attributes each on a separate line".
To format an XML document, select Edit, Advanced, Format Document on the menu (or type ^e, d).
Download: Open XML Package Editor Power Tool for Visual Studio 2010
Important Note: You must exit Visual Studio 2010 before installing. If you install while Visual Studio 2010 is running, the package editor will not work until you exit and restart Visual Studio.
Oh, this is absolutely great! It was the one and only reason I kept VS2008 on a VM was to look at the markup without constantly renaming the extension to zip, unzipping and then wading through the xml files manually. Fantastic!