Range range = XMLUtil.getChildRange(parent.doc, parent.gid);
Range range = XMLUtil.getChildRange(parent.getDocument(), parent.gid);
		NodeSet getChildrenInSet(NodeProxy parent, int mode,									boolean rememberContext) {			NodeSet result = new ExtArrayNodeSet();			// get the range of node ids reserved for children of the parent			// node			Range range = XMLUtil.getChildRange(parent.doc, parent.gid);			int low = 0;			int high = length - 1;			int mid = 0;			NodeProxy p;			// do a binary search to pick some node in the range of valid child			// ids			while (low <= high) {				mid = (low + high) / 2;				p = array[mid];				if (range.inRange(p.gid))					break; // found a node, break out				if (p.gid > range.getStart())					high = mid - 1;				else					low = mid + 1;			}			if (low > high)				return result; // no node found			// find the first child node in the range			while (mid > 0 && array[mid - 1].gid >= range.getStart())				--mid;			// walk through the range of child nodes we found			for (int i = mid; i < length && array[i].gid <= range.getEnd(); i++) {				switch (mode) {					case NodeSet.DESCENDANT :						if (rememberContext)							array[i].addContextNode(parent);						else							array[i].copyContext(parent);						result.add(array[i], range.getDistance());						break;					case NodeSet.ANCESTOR :						if (rememberContext)							parent.addContextNode(array[i]);						else							parent.copyContext(array[i]);						result.add(parent, 1);						break;				}			}			return result;		}