In the Xalan samples, there is an example of how to use XPath to create a
NodeIterator object from a Document object.  When the statement:

XPathAPI.selectNodeIterator(doc, xpath);

is executed, a NodeIterator is returned.  My question is whether this
NodeIterator actually contains the DATA ONLY that XPath specifies, or
whether the NodeIterator has a reference to the whole Document object, and
simply has information required to traverse this Document.

The reason that the answer is of great importance, is that I have a client
and server app comunicating over RMI -- the client will be passing an XPath
string over RMI as a parameter to a server method, and the server will be
returning a NodeIterator.  I do *not* want to be passing the whole Document
across the wire, merely the results of my query.

Can someone enlighten me to the true nature of the contents of NodeIterator,
and also, if this is the proper approach to take in querying subsets of data
from an XML document across the wire?

Thanks in advance,

BradO

Reply via email to