XML Validation

# Status Quo (2018-10-12)

- 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 --save-schema <FILE>)
- XML validation can be configured for all binary executables using --xml-validation

## 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:

- lxml
- XSV

further candidates:

- xmlproc
- minixsv

A short comparison:

| lxml | XSV | xmlproc | minixsv
--- | --- | --- | --- | ---
Execution Type | library | application | library | library
Dependencies | libxml 2.6.21 or later, libxslt 1.1.15 | ? | ? | genxmlif

#### Search

Enter your search terms:

#### Keyboard Shortcuts

Key | Action
--- | ---
`?` | Open this help dialog
`s` | Search the Documentation
`e` | Edit current page on GitHub