lib::Config::Setting::UseraContributed Perl lib::Config::Setting::XMLParser(3)

       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";

       Config::Setting::XMLParser provides access to settings stored in an XML
       File.  The XML File is expected to have the following structure:

           <section name="SECTION">
             <item name="KEY">VALUE</item>

       Multiple <section>s and <item>s may be present.  Any leading and
       trailing whitespace within an <item> tag will be stripped.

       new ( ARGS )
           Instantiate a new object.  ARGS is a set of keyword / value pairs.
           Recognised options are:

               Process the filename provided.

       String  Process the string passed in directly, rather than accessing it
               from the disk.

               One of Filename or String is required.  Any remaining arguments
               will be passed to the XML::Parser constructor.

       init ( )
           Internal.  Do not use.

       parse ( )
           Internal.  Do not use.

       sections ( )
           Return a list of all sections that occurred in the data.  They are
           returned in the order in which they originally occurred.

       keylist ( SECTION )
           Return a list of all keys in SECTION.

       get ( SECTION, KEY )
           Return the value of KEY in SECTION.

       perl(1), Config::Setting::IniParser(3).

       Dominic Mitchell, <>.

3rd Berkeley Distribution    perl 5.005, patlib::Config::Setting::XMLParser(3)