Get off your high horse about XML compliance. He gave a sample input format and asked how to grab pieces of it. If he changes the input format or wants it to handle broken input, he has to change the way he parses. That's true with an XML parser too.