Dan Scott wrote:
On 14/11/2007, Travis Schafer <[EMAIL PROTECTED]> wrote:
Thanks for the code, Travis!
[snip]
This looks really nice, actually - it's always good to have examples
of well-documented code that make the import process more explicit! As
xmlReadFile() reads the whole XML document into memory, I suppose it
would make sense for large libraries interested in using this approach
to chunk the blocks of records up into reasonable sizes (50K records
per file or so). import_holdings.pl, which I reworked a bit in trunk,
suffers from the same affliction, but what are you gonna do?
A SAX version might be in order... Libxml2 and Expat both provide fast
and relatively easy to use SAX API's. An Expat example can be found at
http://svn.open-ils.org/trac/ILS/browser/trunk/Open-ILS/src/apachemods/mod_xmlent.c
(search for "XMLCALL" and "parser")
Just a thought..
-bill
--
Bill Erickson
| VP, Software Development & Integration
| Equinox Software, Inc. / The Evergreen Experts
| phone: 877-OPEN-ILS (673-6457)
| email: [EMAIL PROTECTED]
| web: http://esilibrary.com