org.apache.commons.configuration.plist
public class XMLPropertyListConfiguration extends AbstractHierarchicalFileConfiguration
Example:
<?xml version="1.0"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="1.0"> <dict> <key>string</key> <string>value1</string> <key>integer</key> <integer>12345</integer> <key>real</key> <real>-123.45E-1</real> <key>boolean</key> <true/> <key>date</key> <date>2005-01-01T12:00:00-0700</date> <key>data</key> <data>RHJhY28gRG9ybWllbnMgTnVucXVhbSBUaXRpbGxhbmR1cw==</data> <key>array</key> <array> <string>value1</string> <string>value2</string> <string>value3</string> </array> <key>dictionnary</key> <dict> <key>key1</key> <string>value1</string> <key>key2</key> <string>value2</string> <key>key3</key> <string>value3</string> </dict> <key>nested</key> <dict> <key>node1</key> <dict> <key>node2</key> <dict> <key>node3</key> <string>value</string> </dict> </dict> </dict> </dict> </plist>
Since: 1.2
Version: $Revision: 492216 $, $Date: 2007-01-03 17:51:24 +0100 (Mi, 03 Jan 2007) $
Nested Class Summary | |
---|---|
static class | XMLPropertyListConfiguration.ArrayNode
Container for array elements. |
static class | XMLPropertyListConfiguration.PListNode
Node extension with addXXX methods to parse the typed data passed by Digester.
|
class | XMLPropertyListConfiguration.SetNextAndPopRule
Digester rule that sets the object on the stack to the n-1 object
and remove both of them from the stack. |
Field Summary | |
---|---|
static int | INDENT_SIZE Size of the indentation for the generated file. |
static long | serialVersionUID
The serial version UID. |
Constructor Summary | |
---|---|
XMLPropertyListConfiguration()
Creates an empty XMLPropertyListConfiguration object which can be
used to synthesize a new plist file by adding values and
then saving(). | |
XMLPropertyListConfiguration(HierarchicalConfiguration c)
Creates a new instance of XMLPropertyListConfiguration and
copies the content of the specified configuration into this object.
| |
XMLPropertyListConfiguration(String fileName)
Creates and loads the property list from the specified file.
| |
XMLPropertyListConfiguration(File file)
Creates and loads the property list from the specified file.
| |
XMLPropertyListConfiguration(URL url)
Creates and loads the property list from the specified URL.
|
Method Summary | |
---|---|
void | load(Reader in) |
void | printNode(PrintWriter out, int indentLevel, Node node)
Append a node to the writer, indented according to a specific level. |
void | printValue(PrintWriter out, int indentLevel, Object value)
Append a value to the writer, indented according to a specific level. |
void | save(Writer out) |
XMLPropertyListConfiguration
and
copies the content of the specified configuration into this object.
Parameters: c the configuration to copy
Since: 1.4
Parameters: fileName The name of the plist file to load.
Throws: org.apache.commons.configuration.ConfigurationException Error while loading the plist file
Parameters: file The plist file to load.
Throws: ConfigurationException Error while loading the plist file
Parameters: url The location of the plist file to load.
Throws: ConfigurationException Error while loading the plist file