int numItems = 0;
if (!(xOb instanceof XNodeSet))
// then we only have a single (probably atomic) item.
numItems = 1;
else {
nodeList = xOb.nodelist();
numItems = nodeList.getLength();
}
// Return a list of the items contained in the query results.
ArrayList itemRefs = new ArrayList();