Validate XML against XSD
validate_xmlValidate an ISO 20022 XML document against the official schema for a specified pacs message type to check compliance and correctness.
Instructions
Validate a raw XML string against a message type's bundled XSD.
Use this to check an externally produced XML document against the official
ISO 20022 schema. To generate a document that is already XSD-validated,
use ``generate_message`` instead.
Returns ``{"message_type": str, "is_valid": bool}``.
Args:
message_type: A supported ISO 20022 pacs message type.
xml: The raw XML document to validate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | A raw ISO 20022 XML document to validate against the bundled XSD schema for the given message type. | |
| message_type | Yes | A supported ISO 20022 pacs message type, e.g. 'pacs.008.001.08' FI-to-FI Customer Credit Transfer. Must be exactly one of: 'pacs.002.001.12', 'pacs.003.001.09', 'pacs.004.001.11', 'pacs.007.001.11', 'pacs.008.001.01', 'pacs.008.001.02', 'pacs.008.001.03', 'pacs.008.001.04', 'pacs.008.001.05', 'pacs.008.001.06', 'pacs.008.001.07', 'pacs.008.001.08', 'pacs.008.001.09', 'pacs.008.001.10', 'pacs.008.001.11', 'pacs.008.001.12', 'pacs.008.001.13', 'pacs.009.001.10', 'pacs.010.001.05', 'pacs.028.001.05' (see list_message_types). |