Thanks for replying. I ended up answering my own question. I used
XML::Twig to find chunks I was interested in, could grab indexing
information from the twig, then save the indices in a database for
later lookup of the entire XML record and...presto, random-access of
200 Mb of XML!
On Jul 22, 2004, at 7:06 PM, Hanson, Rob wrote:
>> Ideally, I would use SAX to parse things
> Optionally you could look at XML::RAX.
> Article on the RAX concept:
> RAX allows you to specify a record seperator (a tag in the XML file),
> splits into into chunks of that tag. It is stream based so it only
> reads in
> as much of the file it needs to construct the next record. It only
> to XML files that fit that type of format though (like RSS). At the
> least you might find the code helpful.
>> but I can't figure out how to echo the data
>> back out exactly as I got it.
> I'm not sure I completely understand. Anyway I am out of here today,
> you find an answer.
> -----Original Message-----
> From: Sean Davis [mailto:email@example.com]
> Sent: Thursday, July 22, 2004 5:42 PM
> To: firstname.lastname@example.org
> Subject: splitting large xml file
> I have a very large (200Mb) XML file that consists of multiple
> records. I
> would like to split these records up and store the XML for each in a
> database for quick retrieval. I simply need to echo all of the XML
> the enclosing record tags into the database. Ideally, I would use SAX
> parse things, but I can't figure out how to echo the data back out
> as I got it. Any clues?
> To unsubscribe, e-mail: email@example.com
> For additional commands, e-mail: firstname.lastname@example.org
> <http://learn.perl.org/> <http://learn.perl.org/first-response>