Convert ENV to XML
Turn ENV files into XML. Objects become elements inside one root element and every value becomes text, with characters a tag name cannot hold turned into underscores.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop ENV files on the dialor turn it to pick what to do
Your ENV settings as an XML file.Each key becomes an element, and each value becomes text.
What you get
One XML file. The keys from your ENV file become elements inside a single root element, and every value is written as text.
A character that a tag name cannot hold in a key is turned into an underscore.
Attributes and text
A key that starts with @ becomes an attribute. When its value is a list or an object, the attribute holds that value written as JSON text. A key named #text becomes the element's own text.
What changes
A list repeats its element, once for each item. An empty list therefore disappears from the output, and a list of lists is flattened into one run of repeated elements.
To go the other way, use XML to ENV.
ENV and XML.What each format is.
The formats
Dotenv
KEY=value lines that hold environment variables for an app.
- Extensions
- .env
- MIME type
- text
/x -env - Kind
- Text and data
XML
XML documents and data.
- Extensions
- .xml
- MIME type
- application
/xml - Kind
- Text and data
In your code.The same ENV to XML conversion through the API, for your app or your agent.
$ cv convert report.env report.xml$ cv convert report.env report.xmlQuestions.What people ask about ENV to XML.
Yes. The objects become elements inside one root element.
They are turned into underscores in the element name.
No. Every value becomes text.
It disappears. A list repeats its element once per item, so an empty list leaves nothing behind.