javaproperties
The XML .properties
file format encodes a series of key-value string pairs (and optionally also a comment) as an XML document conforming to the following Document Type Definition (published at <http://java.sun.com/dtd/properties.dtd>):
An example XML .properties
file:
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>This is a comment.</comment>
<entry key="foo">bar</entry>
<entry key="snowman">☃</entry>
<entry key="goat">🐐</entry>
<entry key="host:port">127.0.0.1:80</entry>
</properties>
This corresponds to the Python `dict`:
{
"foo": "bar",
"snowman": "☃",
"goat": "🐐",
"host:port": "127.0.0.1:80",
}
dump_xml
dumps_xml
load_xml
loads_xml