There has been a lot of speculation over what the XML support in Office really entails. I think knowledge is really the key here, and I ask all of you who are interested to take some time to actually get your feet wet and understand the facts. I’ve made a number of posts over the past 3 months where I’ve tried to help explain the basics of the existing XML support in Office 2003 because that really helps to better understand what’s coming in Office ’12’. Conversations are obviously more constructive when we all understand what’s going on (and aren’t just basing our knowledge on random blogs and articles).
For those of you with Office 2003, you can get started right away. For those that don’t have Office 2003, there are free online labs you can use where you basically get to play around with Office 2003 online: http://blogs.msdn.com/brian_jones/archive/2005/07/08/436880.aspx
Here are the different posts I’ve made that will help you all in better understanding what you can do, and how easy it is. I think if people played around with this more, we’d have less inaccuracies like the recent Myth of the Binary Key.
Here are the posts I made on Word’s XML support:
- Intro to Word XML Part 1: Simple Word document – In this entry, I show how easy it is to create a basic Word XML document from scratch. You can just use a text editor like notepad to get started and viola, you’ve made you’re own Word document.
- Intro to Word XML Part 2: Simple Formatting – In this entry, I build off the first document and show how formatting is applied to text. It’s important to see how this works, because it’s a different model than that used in HTML. There is a really flat hierarchy of objects that each have properties associated with them. It’s slightly confusing at first, but once you understand it, it makes dealing with formatting really easy.
- Intro to Word XML Part 3: Using Your Own Schema – This is where it gets exciting (at least for me). You can use your own XML tags to add much more meaning to the documents. This allows for true interoperability of your documents with any system. It’s a core part of our XML support.
- Intro to Word XML Part 4: Schema Validation – If you want to run validation against the XML you put in the documents, you can create a schema and give that schema to Word. We will validate the XML that you put in the document against the schema and report those errors.
- Intro to Word XML Part 5: Opening custom XML – If you are already dealing with XML files, you can open those directly in Word for display and editing. You can either use the built in default view that Word applies, or you can create your own XSLT that creates a custom view on that XML. This is a great way of getting XML into a document.
- Intro to Word XML Part 6: Locking down your XML structures – Once you’ve created a Word document that has your XML in it as well, you may want to lock that document down so that people editing that document don’t accidentally change the structures you’ve applied. You can use the range level protection functionality to lock the XML tags down, and only let the end users edit the content inside the tags.
I hope these can help with better understanding what you can do with the XML support in Word. Of course these are just introductions, and you can do a whole lot more. Let me know if there are other topics you’d like to see me go into. Have a great weekend.