XMLResource res = new XMLResourceImpl( collection, Long.toString( pos ), null, indentXML, encoding );
XMLResource res = new XMLResourceImpl( collection, handle, (int)pos, Long.toString( pos ), null, indentXML, encoding );
    public Resource getResource( long pos ) throws XMLDBException {        if ( pos >= resources.size() )            return null;        // node or value?        if ( resources.elementAt( (int) pos ) instanceof Vector ) {            // node            Vector v = (Vector) resources.elementAt( (int) pos );            String doc = (String) v.elementAt( 0 );            String s_id = (String) v.elementAt( 1 );            XMLResource res =                new XMLResourceImpl( collection, doc, s_id, indentXML, encoding );            return res;        }        else if ( resources.elementAt( (int) pos ) instanceof Resource )            return (Resource) resources.elementAt( (int) pos );        else {            // value            XMLResource res = new XMLResourceImpl( collection, Long.toString( pos ),                null, indentXML, encoding );            res.setContent( resources.elementAt( (int) pos ) );            return res;        }    }