]> git.evergreen-ils.org Git - working/SIPServer.git/blob - xmlparse.pl
Initial revision
[working/SIPServer.git] / xmlparse.pl
1 #
2 # This file reads a SIPServer xml-format configuration file and dumps it
3 # to stdout.  Just to see what the structures look like.
4 #
5 # The 'new XML::Simple' option must agree exactly with the configuration
6 # in Sip::Configuration.pm
7 #
8 use strict;
9 use English;
10
11 use XML::Simple qw(:strict);
12 use Data::Dumper;
13
14 my $parser = new XML::Simple( KeyAttr   => { login => '+id',
15                                              institution => '+id',
16                                              service => '+port', },
17                               GroupTags =>  { listeners => 'service',
18                                               accounts => 'login',
19                                               institutions => 'institution', },
20                               ForceArray=> [ 'service',
21                                              'login',
22                                              'institution' ],
23                               ValueAttr =>  [ 'error-detect',
24                                               'enabled' ] );
25
26 my $ref = $parser->XMLin($ARGV[0]);
27
28 print Dumper($ref);