NAME
Tree::Persist::File::XML - A handler for Tree persistence
SYNOPSIS
See "SYNOPSIS" in Tree::Persist or scripts/xml.demo.pl for sample code.
DESCRIPTION
This module is a plugin for Tree::Persist to store a Tree to an XML file.
PARAMETERS
Parameters are used in the call to "connect({%opts})" in Tree::Persist or "create_datastore({%opts})" in Tree::Persist.
This class requires no additional parameters beyond those specified by its parent, Tree::Persist::File.
METHODS
Tree::Persist::File::XML is a sub-class of Tree::Persist::File, and inherits all its methods.
XML SPEC
The XML used is very simple. Each element is called "node". The node contains two attributes - "class", which represents the Tree class to build this node for, and "value", which is the serialized value contained in the node (as retrieved by the value()
method.) Parent-child relationships are represented by the parent containing the child.
NOTE: This plugin will currently only handle values that are strings or have a stringification method.
The 5 build-in XML character entities (within the node's value) are encoded using this map:
my(%encode) = ('<' => '<', '>' => '>', '&' => '&', "'" => ''', '"' => '"');
They are decoded when XML::Parser reads the value back in.
See http://www.w3.org/standards/xml/core for details.
See also scripts/xml.demo.pl and scripts/store.xml.
CODE COVERAGE
Please see the relevant section of Tree::Persist.
SUPPORT
Please see the relevant section of Tree::Persist.
AUTHORS
Rob Kinyon <rob.kinyon@iinteractive.com>
Stevan Little <stevan.little@iinteractive.com>
Thanks to Infinity Interactive for generously donating our time.
COPYRIGHT AND LICENSE
Copyright 2004, 2005 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.