On Tue, Apr 20, 2010 at 4:25 PM, Ramon F Herrera <ra...@patriot.net> wrote:
>
> Subtitle 1: How to make SAX fly.
> Subtitle 2: Should I use DOM instead?
>
> My application retrieves several items (attributes and text) from large XML
> files. Such items are used to create a spreadsheet. The app is based on
> JAXP, and the code contains many lines like these:
>
> cell.cellValue = oneItemAtATime(xmlFile, "//root/creator/@user");
> cell.cellValue = oneItemAtATime(xmlFile, "//root/creator/@project");
> cell.cellValue = oneItemAtATime(xmlFile, "//root/creator/@projectpath");
> cell.cellValue = oneItemAtATime(xmlFile, "//root/creator/@title");
> cell.cellValue = oneItemAtATime(xmlFile, "//root/creator/@notes");
> cell.cellValue = oneItemAtATime(xmlFile, "//root/creator/@computer");
>
> [...]

I'm not sure what you're using, but nothing in this sample is SAX. It
sounds like there's some higher level API sitting on top of SAX doing
something ill-advised. Were you to rewrite this app to use real SAX,
you could first use a single pass to grab all the values you need; and
then fill the cells.

-- 
Elliotte Rusty Harold
elh...@ibiblio.org

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to