As it turns out, one of the most generally useful pieces of code I've written at work is an XML parser plugin. The studio uses XML for a variety of things: configuration files, asset storage and description, and also XML is stored in attributes on Maya nodes.
We had an XML parser library in C++ but nothing callable from MEL. The studio hadn't switched over to Python yet so there was no good solution. Before I got there, any functionality that needed to parse XML was either written in C++ (which means there are a number of tools written in C++ that should be MEL), or people just kind of did a rough grovel through the XML to extract what they needed and just hoped it worked.
Two or three weeks after I started (back in February or March of 2007), I spent a weekend wrapping the C++ XML library in a plugin. I took the design decision to make the interface look like the C++ methods and so I ended up with MEL commands like:
xmlGetNumChildren
xmlGetChild
xmlGetNumAttributes
xmlAppendAttribute
etc.
There are about twenty different commands. In hindsight this wasn't the right decision. While it's useful for people familiar with the XML parser, it's not very familiar to those native MEL speakers.
Even so, this has been very useful at work to a wide variety of people. So I decided I needed the same functionality at home, so I've been working on an XML parsing plugin in my spare time. I'm using Python some (both at work and at home) but haven't moved over completely so I think this will definitely get some use.
I found an XML parser by Frank Vanden Berghen to use and I've been writing a plugin in my spare time at home. It's given me a chance to correct the design flaw described above. Now there's just a handful of commands, one each for elements, attributes and data (plus a few utility functions for doing file I/O, etc). The commands support create, query and edit modes. A much better MEL-ish interface.
I'll be posting the plugin binaries plus the source and VS2005 project file in the next week or so. I've got a bit more work to do to finish it up along with some more testing.