return (Node[])o;
}
// Collection
else if(o instanceof Collection) {
Collection coll=(Collection)o;
Iterator<Object> it = coll.valueIterator();
List<Node> nodes=new ArrayList<Node>();
while(it.hasNext()) {
nodes.add(toNode(doc,it.next(),false));
}
return nodes.toArray(new Node[nodes.size()]);