Convert XML to TOML
Turn XML files into TOML. The same keys and values as TOML, with plain values written before tables, and a top-level list is written under the key items, as [[items]] tables when its entries are objects.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop XML files on the dialor turn it to pick what to do
XML data as a TOML file.The same keys and values, written as one TOML file.
What you get
One TOML file with the same keys and values as the XML. Plain values are written before tables, as TOML expects.
A top-level list is written under the key items. When its entries are objects, they become
[[items]]tables.What it cannot hold
TOML has no null. A null in an object is dropped, and the conversion warns you about it.
A null inside a list fails, because TOML cannot hold it there. An integer beyond the signed 64-bit range fails for the same reason.
When it stops
If the XML cannot be parsed, the conversion stops with
input_corrupted.To go the other way, use TOML to XML.
XML and TOML.What each format is.
The formats
XML
XML documents and data.
- Extensions
- .xml
- MIME type
- application
/xml - Kind
- Text and data
TOML
TOML configuration files, the format of Cargo and pyproject.
- Extensions
- .toml
- MIME type
- application
/toml - Kind
- Text and data
In your code.The same XML to TOML conversion through the API, for your app or your agent.
$ cv convert report.xml report.toml$ cv convert report.xml report.tomlQuestions.What people ask about XML to TOML.
Yes. The TOML has the same keys and values as the XML, with plain values written before tables.
In an object, it is dropped and you get a warning. Inside a list, the conversion fails, since TOML cannot hold a null there.
It is written under the key items. If its entries are objects, they are written as [[items]] tables.
The XML could not be parsed. The conversion stops with input_corrupted when that happens.