Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] loading xml as a resource

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: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] loading xml as a resource
  • Date: Wed, 18 Jan 2006 12:50:56 -0500

teknokrat wrote:
I am trying to parse an xml file in my jar using

builder.build(getClass().getResourceAsStream("myfile.xml"));

I get a nu.xom.ParsingException: Premature end of file.

If I read the file into a string and pass it to the builder everything works OK. Is this how its meant to work or am I doing something silly?


Nothing obvious is wrong, but it's hard to tell without seeing more
details. I haven't tried this myself so it's possible there's some weird
bug involving line endings somewhere that I'm tripping over. Can you
produce a small test case?

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim





Archive powered by MHonArc 2.6.24.

Top of Page