Ben Munat <[EMAIL PROTECTED]> wrote:
First, thanks for your answer.
I think you can use Saxon with dom4j. Check out the javadocs for
SAXReader; it talks about setting the reader to whatever parser you want.
I don't want to use Saxon. I can do it in Saxon, but I would preffer dom4j instead.
When I do:
doc = saxReader.read(stringReader);
//do Xpath _expression_
List list = doc.selectNodes(query);
SAXreader do it job (now, when I chenge not to use InputStream, now it use StringReader), but second expresion, doc.selectnodes , gives OutOfMemory.
If for some reason, SAXReader won't work with Saxon, you could also try
passing SAXReader's "read" method a File instead of the
InputSource/StringReader combo:
reader.read(new File(xmlFileName));
I have no idea if that'll make a difference... the memory usage may be
the same or worse. But it couldn't hurt to try it.
I don't have a file. I read data from MySQL BLOB. In fact, I made XML:DB implementation (native XML database) with MySQL and used dom4j for implement XPathQueryService, but today I made new implementation of this Service using Saxon.
I wanted to avoid Saxon, becouse :
1. I don't like Saxon
2. suspicious licence
3. unsinchronized documentation with actual implementation (i.e. examples from the tutorial cannot compile)
4. IMO : Saxon API is more complicated then dom4j API
Sorry I don't know a surefire answer to your problem.
No problem, at least you try to help (and succeded a bit).
Thank you!
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!