Validate XML
Check that XML is well written and, if you give them, that it follows one or more XSD schemas or its DTD; gives the result instead of failing.
Command in the XML toolkit · id ooa.xml/validate · 7 inputs, 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Xsd path | File | No | XSD schema file; without it only well-formedness is checked. | |
| XML | String | No | XML text (or use path). | |
| Path | File | No | XML file (or use xml). | |
| More schemas | List | No | Further XSD files the document must follow together with xsd_path, e.g. one per namespace. | |
| Check against the DTD | Boolean | No | false | Check the document against its DTD: the one inside its DOCTYPE, or the file in dtd_path (a DTD the DOCTYPE points to elsewhere is never downloaded). |
| Dtd path | File | No | DTD file to check against; used for the DOCTYPE's outside DTD, or added when the document has no DOCTYPE. | |
| Session | String | No | Check the XML of this session (Start session). |
Outputs
| Output | Type | What it is |
|---|---|---|
| valid | Boolean | True when the document is valid. |
| errors | List | Validation errors with line numbers. |