Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: parsing XML fragments (xml log files) with XML::Parser

by wind (Priest)
on Mar 18, 2011 at 00:07 UTC ( #893879=note: print w/ replies, xml ) Need Help??


in reply to parsing XML fragments (xml log files) with XML::Parser

Could just use XML::Simple and add a root node as needed

use XML::Simple; use Data::Dumper; use strict; my $data = do {local $/; <DATA>}; my $ref = XMLin("<root>$data</root>"); print Dumper($ref); __DATA__ <logentry>...more xml 1...</logentry> <logentry>...more xml 2...</logentry> <logentry>...more xml 3...</logentry>
Then again, that's not an event-based parser. Will consider other possible solutions...


Comment on Re: parsing XML fragments (xml log files) with XML::Parser
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://893879]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2014-09-17 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (82 votes), past polls