tree.startDocument(0);
for (Iterator<XdmItem> it = value.iterator(); it.hasNext();) {
XdmItem item = it.next();
tree.append((Item)item.getUnderlyingValue(), 0, NodeInfo.ALL_NAMESPACES);
}
tree.endDocument();
tree.close();
} catch (XPathException err) {
throw new SaxonApiException(err);
}
}