Thanks for the suggestions Dave, I can see that this might be difficult.
> I'm not sure what you're looking for here. There's a lot the parser does > to take an XML document and turn it into a > DOM or SAX events, including whitespace normalization, expanding entities, > transcoding, etc. You could write your own implementation of the Xerces-C > DOM abstract DOM, or Xalan-C's abstract DOM, but that's a lot of work. > And, in the end, if you XPath expressions refer to the entire tree, you > will end up loading the entire tree anyway. > The most important point that I am concerned with at the moment * Is it possible to tell XPath not to descend part of the tree? I think you said this was impossible, but I would like to know for sure. Presumably it is possible if you hack XPath ... not that I want to do that. You gave me a few suggestions, but that would still result in a memory hungry application... Another way to do it might be. 1. Read the file and remove the very large tree branch. using fopen, fread, etc 2. Write this to two separate xml files. One of these files represents a header, the other the actual data. 3. Continue to use the library on the header, use an alternative implementation on the actual data. This would work, but is a little ugly. Is there a better way? Thanks again, David
