XML/XSD matching
The value must be a valid XML matching an XSD.
Parameter table
param | unit | required | description |
---|---|---|---|
key | yes | The key of the XML value to validate. | |
schema | yes | The XSD schema to validate against. |
How to setup
This rule checks whether the XML value associated with the specified (key
) matches the specified XSD (schema
).
The Schema is an XML document that describes the structure and format of the XML data.
For more information about XSD, check out the W3Schools tutorial.
If the XML value does not match the schema, the rule will fail.
Creator tips
XSD stands for XML Schema Definition. It is a way to describe and validate the structure and content of XML documents. XSD uses a syntax to define the elements, attributes, and data types allowed in an XML document. It helps ensure that XML documents conform to a specific structure, making it easier to exchange data between different systems. So, this rule can be used to validate your XML data against an XSD schema.
To build an XML that matches an XSD schema, you have to follow the structure of the XSD schema and the data types of the elements. For a quick tutorial about XML, check out the W3Schools tutorial. You can also refer to the examples.
Examples
value | valid | schema | description |
---|---|---|---|
<?xml version="1.0" encoding="UTF-8"?> | ✅ | <?xml version="1.0" encoding="UTF-8"?> | The XML value matches the XSD schema. |
<?xml version="1.0" encoding="UTF-8"?> | ❌ | <?xml version="1.0" encoding="UTF-8"?> | The XML value does not match the XSD schema. |