in reply to XML::Simple problems
I was able to get XML::Simple to read in that data just fine. However, I did notice that your opening "declaration" tag was missing the ">" at the end of that line. Not sure if that is missing in your original data or if this was a just a "cut & paste" mistake in your post.
Here's the contents of sample.xml:
<declaration dd:maxOccur="-1" dd:minOccur="0" dd:nullType="exclude"> <contentDeclaration dd:minOccur="0" dd:nullType="exclude"/> <value dd:minOccur="0" dd:nullType="exclude"/> </declaration>
Here's the code I ran:
use strict; use warnings; use XML::Simple; use Data::Dumper; my $xml = XMLin('sample.xml'); print Dumper($xml);
And here's the output:
$VAR1 = { 'dd:minOccur' => '0', 'contentDeclaration' => { 'dd:minOccur' => '0', 'dd:nullType' => 'exclude' }, 'value' => { 'dd:minOccur' => '0', 'dd:nullType' => 'exclude' }, 'dd:maxOccur' => '-1', 'dd:nullType' => 'exclude' };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML::Simple problems
by zwon (Abbot) on Dec 27, 2011 at 16:45 UTC | |
|
Re^2: XML::Simple problems
by norricorp (Initiate) on Dec 27, 2011 at 18:09 UTC |