Convert YAML mappings, nested objects, arrays, and scalars into structured XML locally.
Loading tool
About YAML to XML
Convert YAML into well-formed XML. Mappings become nested elements, sequences repeat their parent element, and keys prefixed with @_ become attributes. You can set the root and array item element names, indentation, whether to include the XML declaration and whether to self-close empty elements.
Common uses
- Generate an XML config or payload from YAML you maintain by hand
- Produce XML test fixtures from readable YAML
- Move data from a YAML-based tool to one that expects XML
FAQ
- How do I add XML attributes from YAML?
- Prefix the key with @_, for example a key @_id: 7 under an element becomes id="7" on that element.
- What happens to keys that are not valid XML names?
- XML element names cannot start with a digit or contain spaces and most punctuation. Such keys are sanitized by replacing invalid characters with underscores.