// Give it a Saxon wrapper
DocumentWrapper docw = new DocumentWrapper(doc, sourceID, new Configuration());
// Retrieve all the ITEM elements
XPathEvaluator xpath = new XPathEvaluator(docw);
Iterator iter = xpath.evaluate("//ITEM").iterator();
// For each of these, compute an additional attribute
while (iter.hasNext()) {
//NodeWrapper node = (NodeWrapper)enum.next();