The XML form is the same tree of values as the binary form, written out as text. It is usually UTF-8 and is an ordinary XML document, so any XML tool can read it.
The document
An XML declaration and document type, then a plist root element holding
exactly one value, usually a dict.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Name</key>
<string>Example</string>
<key>Count</key>
<integer>3</integer>
</dict>
</plist>
The values
| Element | Holds | Written as |
|---|---|---|
dict | A dictionary | Alternating key and value elements. Each key is followed by its value. |
key | A dictionary key | Text. Only inside dict. |
array | An array | Any number of value elements. |
string | A string | Text; the XML entities and character references apply. |
integer | An integer | Decimal text, with an optional sign. Apple’s readers also take 0x hexadecimal. |
real | A floating-point number | Decimal text; also nan, inf and -inf. |
true | A boolean | An empty element, <true/>. |
false | A boolean | An empty element, <false/>. |
date | A date and time, in UTC | ISO 8601 text in the form 2001-01-02T03:04:05Z. |
data | Bytes | Base64 text. White space is ignored. |
The element names and their content model are given by Apple’s
PropertyList-1.0.dtd. The binary form’s UID, URL and UUID values have no
XML element of their own. A UID is written as a dictionary with the single key
CF$UID and an integer value.
Dictionaries
A dict holds pairs, and the order of the pairs carries no meaning. Keys
are strings, are unique within a dictionary, and are matched exactly, including case.
Comments and processing instructions are allowed by XML and are ignored.
Encoding
The file is usually UTF-8, as its declaration says. Characters that are special in
XML are written as <, > and
&, and a string can also use a CDATA section.