Generate sample XML from an XSD

Need a test file for an interface, an example for documentation, or a starting point for a message you have to write by hand? Pick an element in the tree and choose Sample XML.

From the command line

The same validation is available through the REST API: post a schema and an XML document and get a JSON list of errors with line numbers — useful in CI pipelines that produce XML.

Load a schema

Questions

Is the generated XML valid?

The generator checks every sample against the schema. In rare cases — very unusual patterns or XSD 1.1 assertions — a value may not fit; the check tells you, and such cases are reported so the generator can be improved.