Evaluating XPath expressions without loading the DOM tree in thememory

L

Luc Mercier

Hi folks,

I'm using dom4j to process xml, and mostly do some stuff like that:

Document xmldoc = ...
for (Object o : xml.selectNodes("an xpath expression")) {
Node n = (Node) o;
// do some stuff
}


The stuff I need to do internally only requires access to the subtree
rooted in the node 'n', which is rather small, but the whole document is
huge.

I would like to be able to do something similar with documents I cannot
load into memory. Therefore what I would like to have is an
implementation of Document which, instead of being an explicit tree, is
an implicit representation of a document stored in a file.

As I understand, dom4j does not allow to do that. Writing a new
implementation of Document seems a lot of work, and I'm not really
considering this option.

Any suggestion?

- Luc.
 
Joined
Aug 15, 2006
Messages
10
Reaction score
0
HI,
I am searching for XML parser to convert the file into DOM tree..i hope u r also working in the same area..I need the code...to form DOM tree..

Will it be helpful to convert any kind of documnet to DOM tree..?


Help plz...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,244
Latest member
cryptotaxsoftware12

Latest Threads

Top