Let me see. what would the code be for the very same thing using XML::Rules:
There's less code to get the job done without XSLT then there is to apply it. And I'm sure you'd get the same result using most other modules.use XML::Rules; my $xml = q{<eSummaryResult> <DocSum> <Id>25</Id> <Item Name="Description" Type="String">Ableson Murine</Item> </DocSum> <DocSum> <Id>26</Id> <Item Name="Description" Type="String">yada yada</Item> </DocSum> <DocSum> <Id>27</Id> <Item Name="Description" Type="String">yada yada something else</It +em> </DocSum> </eSummaryResult> }; my $parser = XML::Rules->new( rules => [ Item => sub { $_[1]->{Name} => $_[1]->{_content}}, Id => 'content', DocSum => sub { print "$_[1]->{Id}, $_[1]->{Description}\n"; return; }, ] ); $parser->parse($xml);
I find XSLT incredibly clumsy, blithering and unreadable.
In reply to Re^2: XML need suggestions
by Jenda
in thread XML need suggestions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |