package eu.dnetlib.xml.database;

import org.xmldb.api.base.XMLDBException;

/**
 * Result of a query to the an xml db.
 * 
 * @author marko
 * 
 */
public interface XMLDBResultSet {
	/**
	 * number of results.
	 * 
	 * @return number of result elements
	 * @throws XMLDBException
	 *             happens
	 */
	long getSize() throws XMLDBException;

	/**
	 * gets a given entry in the result.
	 * 
	 * @param index
	 *            0 based item index
	 * @return xml string
	 * @throws XMLDBException
	 *             happens
	 */
	String get(int index) throws XMLDBException;
}
