| Config::Setting::XMLParser - parse XML settings file. |
Config::Setting::XMLParser - parse XML settings file.
use Config::Setting::XMLParser;
my $ini = Config::Setting::XMLParser->new(Filename => $xmlfile); foreach my $s ($ini->sections()) { print "[$s]\n"; foreach my $k ($ini->keylist($s)) { print $k, "=", $ini->get($s, $k), "\n"; } print "\n"; }
This class provides access to settings stored in an XML File. The XML File is expected to have the following structure:
<settings>
<section name="SECTION">
<item name="KEY">VALUE</item>
</section>
</settings>
Multiple <section>s and <item>s may be present. Any leading and trailing whitespace within an <item> tag will be stripped.
Instantiate a new object. ARGS is a set of keyword / value pairs which will be passed to the the XML::Parser manpage constructor.
Parse FILENAME as XML.
Parse the string as XML.
Return a list of all sections that occurred in the data. They are returned in the order in which they originally occurred.
Return a list of all keys in SECTION.
Return the value of KEY in SECTION.
perl(1),
the Config::Setting::IniParser manpage,
the XML::Parser manpage.
Dominic Mitchell, <cpan (at) happygiraffe.net>.
| Config::Setting::XMLParser - parse XML settings file. |