Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.24 KB

xmlprops.rst

File metadata and controls

51 lines (39 loc) · 1.24 KB

javaproperties

XML .properties Format

Format Overview

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",
}

Functions

dump_xml

dumps_xml

load_xml

loads_xml