This week I needed to create an XML Schema doc for work. The XSD file would be used to validate XML files I’ll be making for my online courses. Well, being a newbie to XSD files (though not XML), I was making decent but very slow progress when a thought occurred to me: it should be possible to reverse-engineer an XML file to create an XSD file. And, considering how prevalent XML is these days, someone probably posted an online converter for it! Google to the rescue!

I found a number of tools (mostly software downloads such as XMLSpy), but the easiest one I’ve tried so far is by — gulp — the Evil Empire itself: Microsoft.

http://apps.gotdotnet.com/xmltools/xsdinference/ [link no longer available]

All I can say is whether you love ’em or hate ’em, their tool works great and is completely free. On my first try it pointed out some invalid XML I had written. After correcting my mistake, BAM!, I had a complete XSD file. It wasn’t perfect and needed some tweaking (optional versus required tags, string v. integer, etc.), but it eliminated most of the heavy lifting for me and I’ll be finished a heck of a lot sooner than I would have been without it.

Umm… thanks, Microsoft! (For once…)

Similar Posts