Add a second whole document
Each sample needs one complete XML root. Blank extra editors are ignored; a second document can expose a missing child or attribute that one document cannot reveal.
XML tools
Compare one XML document with a second sample to see which fields become optional.
Samples stay in this browser. Local files are read here and are not uploaded.
Result is out of date; export is disabled.
An XML to XSD generator helps when an integration sends example payloads but no schema. Each document is evidence of what occurred, not proof of everything the sender permits.
Here you can generate XSD from XML samples in one browser tab. The draft is compiled and checked against every sample before export, so an order conflict or unsupported namespace fails visibly.
Two same-root samples can show a field absent from one instance. The XML to XSD generator marks that observed omission with minOccurs=0, while repeated siblings become maxOccurs=unbounded. It does not guess unseen alternatives.
A customer name and a product name can have different structures. Local XSD declarations preserve their distinct parent paths; the completed schema is then checked against both inputs instead of trusting the first result.
Each sample needs one complete XML root. Blank extra editors are ignored; a second document can expose a missing child or attribute that one document cannot reveal.
Smart infers booleans, numbers and ISO dates conservatively. Switch to String when codes such as 001 or mixed value formats must remain text. Automatic generation waits 400 ms; turn it off for several edits and press Ctrl/Cmd+Enter.
A successful result compiles as XSD 1.0 and accepts every supplied sample. Before using it with new data, review minOccurs, maxOccurs, type guesses and xs:sequence; samples alone cannot define the business contract.
The XML schema generator combines matching root documents. A child missing under one observed parent is optional; sibling names repeated under one parent get an unbounded maximum. Attributes follow the same observed-presence rule.
The infer XSD from XML workflow detects clear boolean, integer, decimal and ISO date values. Empty strings, conflicts and codes with leading zeroes stay xs:string; no example proves a range or enumeration.
The XSD 1.0 draft uses local declarations to avoid merging identical names under unrelated parents. A browser worker compiles it and checks every input; only then can you copy or download the complete schema.
Yes. Add up to 20 complete documents with the same root and namespace. The XML to XSD generator merges observed children and attributes, then verifies that its one output schema accepts every nonempty sample.
Include at least one occurrence of its parent without that child. The inferred declaration then gets minOccurs=0. A field present in every sample cannot be proved required; edit the draft if your real contract allows omission.
Digits without leading zeroes look numeric to Smart mode. Switch to String before generating if identifiers should always remain text. Values such as 001 already remain xs:string because dropping the zero would change their meaning.
It can be a starting schema, but the internal check proves only that the source samples pass. A new document may expose missing alternatives, a different order or a wider value type. Test it with the separate XSD validator and refine the draft.
No sample is submitted for generation. The browser reads local files and runs parsing, inference and XSD checking in a worker. Copy and download happen only when you request them; reloading the page discards the current inputs.
Does a guess need a closer look?
Use the XML to XSD generator with a second representative payload, inspect the optional and repeated declarations, then validate a new document before adopting the schema.