in reply to Record based XML stream processing?

One simple thing you could do is just build your own pacing code around something like XML::Simple :
use strict; use XML::Simple; use Data::Dumper; while (<>) { next if /xml|ArgusDataStream/; my $xml=$_; $xml.=<> while $xml !~ m|</ArgusFlowRecord>|; my $xmlhash=XMLin($xml); print Dumper($xmlhash); } __END__ $ xmlstuff.pl <xmlinput $VAR1=' Flow data set 1 '; $VAR1=' Flow data set 2 ';
where the file xmlinput contained:
<?xml version="1.0"> <ArgusDataStream> <ArgusFlowRecord> Flow data set 1 </ArgusFlowRecord> <ArgusFlowRecord> Flow data set 2 </ArgusFlowRecord> </ArgusDataStream>
Your XML processing will of course be completely different (and probably not use XML::Simple), but this should give you an idea on how to proceed.

Update: this is basically the same as marcello's solution, and is probably better handled with an event based parser such as XML::Sax::PurePerl, as per jeffa's suggestion in the chatterbox.

CU
Robartes-