Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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...

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: (5)
As of 2016-07-28 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (252 votes). Check out past polls.