> Ideally, I would use SAX to parse things

Optionally you could look at XML::RAX.

Article on the RAX concept:
http://www.xml.com/pub/a/2000/04/26/rax/index.html

RAX allows you to specify a record seperator (a tag in the XML file), and
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 applies
to XML files that fit that type of format though (like RSS).  At the very
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, hope
you find an answer.

Rob


-----Original Message-----
From: Sean Davis [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 5:42 PM
To: [EMAIL PROTECTED]
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 between
the enclosing record tags into the database.  Ideally, I would use SAX to
parse things, but I can't figure out how to echo the data back out exactly
as I got it.  Any clues?

Thanks,
Sean




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to