Maybe that is because I am struggling with the referencing !
Sorry Guys, I am a Perl noob. My problem is that I cannot spend time studying this language. My boss wont let me
I need an output like this:
This is the output i am looking for,
"You have 2 tags: node and node
In node you have attribute type and name with values k and n"
for this xml
XML
----
<XML>
<element>
<node type="k" name="n"/>
<node type="i" name="q"/>
</element>
</XML>
Dummy Code
#!/usr/bin/perl --
use strict;
use warnings;
use XML::Simple;
my $xs1 = XML::Simple->new();
my $doc = $xs1->XMLin($file, keyattr=>['????'], ForceContent=>1, Force
+Array=>1);
use Data::Dumper;
local $Data::Dumper::Indent=1;
print Dumper($doc);
for my $sub ( sort keys %{ $doc->{????} } ){
for my $elem ( sort keys %{ $doc->{????}->{$sub} } ){
}
}
|