Convert PROPERTIES to XML
Turn PROPERTIES 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 PROPERTIES files on the dialor turn it to pick what to do
Java properties as one XML file.Keys become elements under a single root. Every value is written as text.
What you get
One XML file with all the keys from the PROPERTIES file. Objects become elements inside one root element, and every value becomes text.
How names are handled
A tag name cannot hold every character a key can. Characters a tag name cannot hold are turned into underscores.
Keys that start with @ become attributes instead of elements. Where the value is a list or an object, it is written as JSON text. A key named #text becomes the element's own text.
Lists
A list repeats its element, once for each item. An empty list therefore disappears from the output. A list of lists is flattened into one run of repeated elements.
To go the other way, use XML to PROPERTIES.
PROPERTIES and XML.What each format is.
The formats
Java Properties
Key and value pairs in the Java properties format.
- Extensions
- .properties
- MIME type
- text
/x -java -properties - Kind
- Text and data
XML
XML documents and data.
- Extensions
- .xml
- MIME type
- application
/xml - Kind
- Text and data
In your code.The same PROPERTIES to XML conversion through the API, for your app or your agent.
$ cv convert report.properties report.xml$ cv convert report.properties report.xmlQuestions.What people ask about PROPERTIES to XML.
No. Every value becomes text in the XML.
They are turned into underscores in the tag name.
Yes. Start the key with @ and it becomes an attribute. Start a key with #text to set the element's own text.
A list repeats its element once per item. With no items, nothing is written.