<CQA><INFO><owner>USERNAME</owner><name>STRESS TEST</name><description>PERL BUTLER STRESS TEST</description><date>2014-12-13</date><status>1</status><version>9.08</versioAn></INFO><LOG><message>CODE INFO 1</message></LOG></CQA>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
my $data = {
INFO => {
owner => 'USERNAME',
name => 'STRESS TEST',
description => 'PERL BUTLER STRESS TEST',
date => '2014-12-13',
status => '0',
version => '9.08',
},
LOG => {
message => [
'CODE INFO 1',
'CODE INFO 2',
'CODE INFO 3',
]
},
};
1 2 3 4 5 6 7 8 9
use strict; use warnings; use XML::Simple; # $ref ist eine Referenz auf den erzeutgten Hash my $ref = XMLin('<CQA><INFO><owner>USERNAME</owner><name>STRESS TEST</name><description>PERL BUTLER STRESS TEST</description><date>2014-12-13</date><status>1</status><version>9.08</version></INFO><LOG><message>CODE INFO 1</message></LOG></CQA>'); use Data::Dumper; print Dumper $ref;