Choose the entry schema
The main path defaults to main.xsd. XML schema-location hints do not select or download another schema. Pick the file declaring the root element, then add its dependencies.
XML / XPath / XSD
Run manually or press Ctrl/Cmd+Enter. The sample includes a main schema and a referenced type definition.
XML and schema contents stay in this browser; validation does not upload your documents.
Relative ASCII paths, e.g. types/common.xsd. References resolve from the containing schema; no URLs or paths outside the virtual root.
Manual run; 10 seconds including engine loading. XML and each schema: 1,000,000 characters; all schemas: 2,000,000; at most 20 schemas; depth 100.
Result is out of date. Validate again to enable export.
An XSD validator answers a different question from an XML syntax checker: does this document obey the selected schema? A quantity can be well-formed text and still violate an integer restriction or the permitted range.
Use XML schema validation before integrating a feed or configuration. To validate XML against XSD, provide the entry schema and every local dependency; the engine checks the supplied set instead of guessing a schema from the document.
The XSD validator resolves xs:include and xs:import against named local files. A type defined in types.xsd can constrain quantity in the main document; missing dependencies remain explicit failures.
An invalid quantity should lead back to the offending XML line, while an undefined type may originate in a schema. Diagnostics identify the source when the engine provides it and keep the original constraint message.
The main path defaults to main.xsd. XML schema-location hints do not select or download another schema. Pick the file declaring the root element, then add its dependencies.
A schema in orders/main.xsd can include ../types.xsd within the virtual root. Imported filenames can be edited after reading UTF-8 files; duplicate normalized paths are rejected.
Changes cancel an active worker and invalidate the old report. Press Ctrl/Cmd+Enter after the final edit. Switching the visible schema alone does not alter the validation request.
The libxml2 WASM engine compiles XSD 1.0 before checking the XML instance. Undefined types and invalid schema structure are reported separately from a document failing its declared rules.
The sample restricts quantity to an integer from 1 to 100. Required elements, occurrence limits, sequences and namespace-qualified declarations are evaluated by the engine rather than by a list of allowed tag names.
Copy or download JSON for a completed valid or invalid run. The report records its phase, engine and captured diagnostics. Position fields remain absent when unknown; a missing column is never presented as a measured column one.
Paste both the XML and the entry XSD, supply the local schemas it references, and run validation. Well-formed XML alone does not demonstrate schema conformance; the result must reach the validation phase.
Include combines schema components for the same target namespace, including permitted no-namespace inclusion. Import makes components from another namespace available. Supply every referenced local file with the exact relative path used by the containing schema.
Check schemaLocation spelling and case, the containing file’s path and the complete dependency chain. This page only resolves supplied local files; a remote URL or an omitted dependency cannot be fetched automatically.
The engine implements XSD 1.0. Features specific to XSD 1.1, including xs:assert and xs:override, are rejected instead of being silently treated as valid constraints.
Document contents are processed in a browser worker rather than submitted for validation. Reading dependency files loads them into the current page. Copy and download occur only when you request them; refreshing the page discards the current work.
Does a diagnostic look unexpected?
Use the XSD validator to reproduce a mismatch with the same XML, entry schema and dependency paths. Save the completed report alongside that exact input set.