Koha/C4/SIP/xmlparse.pl
Julian Maurice 96cc447045 Bug 25898: Prohibit indirect object notation
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00

31 lines
885 B
Perl
Executable file

#!/usr/bin/perl
#
# This file reads a SIPServer xml-format configuration file and dumps it
# to stdout. Just to see what the structures look like.
#
# The 'new XML::Simple' option must agree exactly with the configuration
# in Sip::Configuration.pm
#
use strict;
use warnings;
use English;
use XML::Simple qw(:strict);
use Data::Dumper;
my $parser = XML::Simple->new( KeyAttr => { login => '+id',
institution => '+id',
service => '+port', },
GroupTags => { listeners => 'service',
accounts => 'login',
institutions => 'institution', },
ForceArray=> [ 'service',
'login',
'institution' ],
ValueAttr => { 'error-detect' => 'enabled',
'min_servers' => 'value',
'max_servers' => 'value'} );
my $ref = $parser->XMLin(@ARGV ? shift : 'SIPconfig.xml');
print Dumper($ref);