3 # Copyright (C) 2006-2008 Georgia Public Library Service
5 # Author: David J. Fiander
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # This file reads a SIPServer xml-format configuration file and dumps it
21 # to stdout. Just to see what the structures look like.
23 # The 'new XML::Simple' option must agree exactly with the configuration
24 # in Sip::Configuration.pm
29 use XML::Simple qw(:strict);
32 my $parser = new XML::Simple( KeyAttr => { login => '+id',
34 service => '+port', },
35 GroupTags => { listeners => 'service',
37 institutions => 'institution', },
38 ForceArray=> [ 'service',
41 ValueAttr => { 'error-detect' => 'enabled',
42 'min_servers' => 'value',
43 'max_servers' => 'value'} );
45 my $ref = $parser->XMLin($ARGV[0]);
47 $Data::Dumper::Indent = 1;