in reply to XML::Twig to mysql totally lost

What have you tried? Without looking at the XML::Twig documentation, I would set up a handler for the close/end of the outer most element that I cared about, at which point all the elements/attributes inside would be available. I'd use the info there, insert it to the db, flush it, and return from the callback. This should keep memory usage at a minimum, speed at a maximum, and keep things simple...ish.

Replies are listed 'Best First'.
Re^2: XML::Twig to mysql totally lost
by Anonymous Monk on Jul 15, 2011 at 03:28 UTC
Re^2: XML::Twig to mysql totally lost
by bcnagle (Novice) on Jul 15, 2011 at 07:46 UTC
    I added the current code I am trying to use below however not positive I did it correctly. From what I was reading in the tutorial, I am grabbing the events where the <file> gets parsed, uploading it to the sql, then trashing the parse and moving to the next one. I am getting an error that I'm trying to get resolved atm but any feedback would be much appreciated.