-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparseXML.pl
More file actions
executable file
·36 lines (29 loc) · 822 Bytes
/
parseXML.pl
File metadata and controls
executable file
·36 lines (29 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/perl
#
# Script to parse Mirth Server Configuration and create a report.
#
# NOT WORKING YET
#
use XML::Simple;
use Data::Dumper;
# create object
$xml = new XML::Simple (ForceArray => 1);
#$xml = new XML::Simple;
# read XML file
$data = $xml->XMLin("data.xml");
print "\n";
#print Dumper($data->{channels}->{channel});
#print Dumper($data);
# print output
#print "\n";
print $data->{updateSettings}->{date};
#print "\n";
#print $data->{channels}->{channel}->{name}[0];
#foreach $key (%$data) {
#foreach $channel (@{$data->{channels}}) {
# print "channel name = $channel->{name}\n";
# print "Channel Name: $key", "\n";
# print "Enabled: ", $key->{enabled}, "\n";
# print "Listen Port: ", $key->{sourceConnector}->{properties}->{listenerConnectorProperties}->{port}, "\n";
# print "\n";
#}