Hi,

I have noticed a difference between the below two methods for doing an xpath
search:

1) session.getRootNode().getNode(xPath);
2) Workspace ws = session.getWorkspace();
   QueryManager qm = ws.getQueryManager();
   Query q = qm.createQuery(xpath, Query.XPATH);
   NodeIterator iter = q.execute().getNodes();
   return iter;

In search #2, the session must be saved before the query will see newly
added nodes within the given session, but in search #1, the results WILL
include newly added nodes within the given session.

The database corollary would be seeing newly added rows within a particular
transaction, so it seems odd to me that search #2 wouldn't see newly added
nodes within the given session. Can anyone enlighten me as to why this is?

Thanks!

Mark

Reply via email to