Developer/XML Validation

=Status Quo (2013-08-30)=
 * The current build scripts for windows and linux execute schemaCheck.py as part of the regular tool tests with results visible on the daily build page (see for instance the schema check tests on the very end of the 64bit linux tool tests page).
 * This script uses lxml (if available) or Sax2Count (on windows only). The latter comes together with the binary xerces windows distribution.
 * Only files which have a schema declaration in the root element and are of the following type (and fit the following naming scheme) are checked:
 * netconvert inputs
 * edges "*.edg.xml"
 * nodes "*.nod.xml"
 * connections "*.con.xml"
 * types "*.typ.xml"
 * sumo nets "*.net.xml", "net.netgen", "net.netconvert"
 * route files "*.rou.xml", "routes.duarouter", "alts.duarouter", "routes.jtrrouter" including vehroutes output
 * additional files "*.add.xml"
 * configuration files "*.????cfg"
 * sumo rawdump (netstate), detector (e1 and e2) and edgedata (net, emissions and noise) outputs
 * There is the possibility to generate the XML schema for the configurations (command line option )
 * XML validation can be switched on for all binary executables using

Still missing

 * schemata for the remaining output files
 * documentation on how to use schemata
 * synchronize documentation, Specification, schema and implementation
 * switch validation on per default (at least for files declaring a schema)

portable testing application (only kept for reference)
28.10.2009: I made a small search on possible tools for validating XML files which are using Python. It seems as two are majorly used: further candidates:
 * lxml
 * XSV
 * xmlproc
 * minixsv

A short comparison: