2025-03-14 21:59:59 -06:00
|
|
|
# xml validate
|
|
|
|
|
|
|
|
|
|
> Validate XML documents.
|
2025-06-28 19:25:29 -06:00
|
|
|
> More information: <https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html#idm47077139576400>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Validate one or more XML documents for well-formedness only:
|
|
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`xml {{[val|validate]}} {{path/to/input1.xml|URI1 path/to/input2.xml|URI2 ...}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Validate one or more XML documents against a Document Type Definition (DTD):
|
|
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`xml {{[val|validate]}} {{[-d|--dtd]}} {{path/to/schema.dtd}} {{path/to/input1.xml|URI1 path/to/input2.xml|URI2 ...}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Validate one or more XML documents against an XML Schema Definition (XSD):
|
|
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`xml {{[val|validate]}} {{[-s|--xsd]}} {{path/to/schema.xsd}} {{path/to/input1.xml|URI1 path/to/input2.xml|URI2 ...}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Validate one or more XML documents against a Relax NG schema (RNG):
|
|
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`xml {{[val|validate]}} {{[-r|--relaxng]}} {{path/to/schema.rng}} {{path/to/input1.xml|URI1 path/to/input2.xml|URI2 ...}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`xml {{[val|validate]}} --help`
|