Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM and Large Files

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Mike Colbert <mbcolbert AT yahoo.com>
  • Cc: John Cowan <cowan AT ccil.org>, xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM and Large Files
  • Date: Wed, 26 Jul 2006 11:46:16 -0400

Mike Colbert wrote:

Thanks, John. Good catch, unfortunately in this specific case the files don't
have root elements, so I need to write in my own before I pass the contents to
XOM. (And I guess the moral of that story is don't keep XML in files without
root elements. It is what it is.)

In that case use a SequenceInputStream to add the root element start and end-tags before you read in the data. You really don't want to read everything into a String first.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/




Archive powered by MHonArc 2.6.24.

Top of Page