Skip Menu |

This queue is for tickets about the XML-Mini CPAN distribution.

Report information
The Basics
Id: 50171
Status: new
Priority: 0/
Queue: XML-Mini

People
Owner: Nobody in particular
Requestors: mario.minners [...] googlemail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.38
Fixed in: (no value)



Subject: XML::Mini toHash() produces some crab
'<readonly/>' is translated in the generated hash to readonl. the 'y' is cut.
Subject: test.pl
#!/usr/bin/perl my $file = "/etc/libvirt/qemu/NAS.xml"; my %vmconfhash; use XML::Mini::Document; use XML::Mini; use Data::Dumper; open(FILE, "<$file") || die "Error: File not readable.\n"; my @lines = <FILE>; close(FILE); my $XMLString = join(' ',@lines); my $xmlDoc = XML::Mini::Document->new(); eval { $xmlDoc->parse($XMLString); }; if ($@) { print "Error: XML parsing error: $@\n"; exit(1); } #my $xmlRoot = $xmlDoc->getRoot(); my $hash = $xmlDoc->toHash(); print Dumper($hash); my $options = { 'attributes' => { 'domain' => 'type', 'type' => ['arch','machine'], 'boot' => 'dev', 'clock' => 'offset', 'disk' => ['device','type'], 'source' => 'dev', 'target' => ['dev','bus'], 'readonly' => '', 'interface' => 'type' } }; $xmlDoc->fromHash($hash, $options); print $xmlDoc->toString();
Subject: NAS.xml