GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Config::Setting::XMLParser(3) User Contributed Perl Documentation 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";
 }

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.

new ( ARGS )
Instantiate a new object. ARGS is a set of keyword / value pairs which will be passed to the XML::Parser constructor.
parse_file ( FILENAME )
Parse FILENAME as XML.
parse_string ( STRING )
Parse the string as XML.
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, XML::Parser.

Dominic Mitchell, <cpan (at) happygiraffe.net>.
2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.