forked from mapnik/mapnik
-
Notifications
You must be signed in to change notification settings - Fork 0
ValidatingXml
sentientpc edited this page Mar 16, 2012
·
3 revisions
To validate the Map xml file, reference mapnik's mapfile DTD as in:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map SYSTEM "mapnik2.dtd">
<Map>
...
</Map>
The DTD file can be found here: https://github.com/mapnik/mapnik/blob/master/utils/xml/mapnik.dtd
- Eclipse
- One time validation: right click on the xml file -> validate
- Automatic validation: right click on project -> properties -> Validation -> Add Validation Builder to project -> OK
xmllint --valid --noout path/to/file.xml