South Star

XML XSD Validator Validate XML Against XSD Schema Introspect API

Free tier included · Tools
Validate XML against XSD schemas with line-level errors. Introspect target namespaces, elements, complex types. Offline, stateless, no external calls.

XML XSD Validator validates XML documents against XSD schemas and introspects schema structure. It covers schema validation, error reporting, and schema introspection. The service is fully offline: no network calls, no disk access, no storage. Uploaded schema includes are resolved only against files you provide; any other schemaLocation is refused with 422 external_reference_blocked.

Three endpoints cover different needs: `POST /validate` for fast standard validation, `POST /validate/full` for comprehensive checks including totals arithmetic and code list validation, and `POST /parse-xsd` to extract target namespace, top-level elements, and complex types from any schema.

Use cases: (1) CI/CD pipelines validating XML payloads against contract schemas before deployment; (2) ETL systems checking incoming XML documents against versioned XSDs with detailed line-level error reporting; (3) Schema management tools that need to introspect and catalog XSD structures programmatically; (4) No-code/low-code platforms adding XML validation without installing libraries.

The API uses lxml (libxml2) by default for fast C-based validation, with an optional xmlschema engine for W3C-conformant XSD 1.1 support. Multi-file schemas are handled by uploading included/imported documents as `includes` — filenames match schemaLocation paths. Malformed XSD or XML returns 4xx structured errors; schema-invalid XML returns 200 with `valid:false` and per-error line numbers.

Endpoints

MethodPathWhat it does
GET/API metadata: name, version, and paths to interactive docs and health endpoint.
GET/healthLiveness probe; returns status "ok" while the process is up.
POST/validateValidate an XML instance against an XSD schema. Returns 200 with valid:true or valid:false plus line-level errors. Malformed XSD/XML returns 4xx.
POST/parse-xsdIntrospect an XSD schema: extract target namespace, top-level elements, and complex types.
POST/validate/fullComprehensive XML validation including totals arithmetic and code list checks. Slower than basic validation but more thorough.

Quick start

curl -X POST "https://xsdvalidator.p.rapidapi.com/validate" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: xsdvalidator.p.rapidapi.com" \
  -F "xsd=@schema.xsd" \
  -F "xml=@document.xml"

FAQ

Does the API make any external network calls or access the filesystem?

No. All processing is offline. Schema includes are resolved only against files you upload; any other schemaLocation is refused with 422 external_reference_blocked.

What's the difference between /validate and /validate/full?

`/validate` performs standard XSD validation using lxml (libxml2) for speed. `/validate/full` adds totals arithmetic checks and code list validation, making it more thorough but slower.

Can I validate XML against multi-file XSD schemas?

Yes. Upload included/imported schema documents as `includes` — filenames must match the schemaLocation paths used in your main XSD.

What file size limits apply?

Maximum 10MB per uploaded file, 50MB total request size. This covers most XML/XSD validation scenarios.

Try XML XSD Validator Validate XML Against XSD Schema Introspect free

Free tier on every plan. Get an API key and start calling in under a minute.

Open on RapidAPI

Related APIs