One thing XML is very good for is semantic documents adhering to a well defined schema - and it's one of the few commonly used text-based data storage formats that do it well (with XSD, DTDs are pretty terrible). Unfortunately the only library that currently implements validation is libxml2 - expat is way nicer, but it never supported it. I don't understand why most XML libraries do not implement validation - XML sucks as a plain data storage format anyway.