Rigid XML Parsing
by in CodeSOD on 2008-06-30Sure, we've chronicled horrible methods of storing data in XML, but what about when you want to retrieve said data? If you're into .NET, you're probably thinking of something in the System.Xml namespace. If you're a Ruby developer, you're probably thinking of REXML. If you're using PHP, the XML Parser extension. If you're a COBOL programmer, then you're probably praying for death.
Well, if you consider yourself a senior-level XML developer, here's a new technique you can add to your repertoire, courtesy of Paul. Here's an example of a technique dubbed Case-Sensitive Replacement-Based Element Parsing, suitable for all* of your XML documents!
Thanks to a generous anonymous donation, Hudson High (as we'll call it) was finally able to trebuchet themselves into the 21st century. In addition to buying new computers for the teachers and staff, they found a contractor that would build them the ultimate system to maintain every function in the school, top to bottom. After a few months the system was built and deployed.
Lyle was displeased. Despite all he had going for him — being the most handsome guy in the office, the smartest guy on the team, having the best all-terrain tires throughout the whole department, and 
