private void printDB(String dbName, String filename, List<ORASSNode> rootNodes) throws MainException{
		// Write xml version info.
		writer.println("<?xml version=\"1.0\"?>");
		// Write DB name to file
		writer.println("<" + dbName);
		writer.println("xmlns=\"http://www.w3schools.com\"");
		writer.println("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
		writer.println("xsi:schemaLocation=\""+filename+".xsd\">");

		//CachedRowSet results = setupData();
		for(int i=0; i<rootNodes.size(); i++){
			ORASSNode root = rootNodes.get(i);
			setupTables(root);
			populateTableData(root);
		}

		assignIDsToTuples();

		for(int i=0; i<rootNodes.size(); i++){
			ORASSNode root = rootNodes.get(i);
			printTable(root, 1);
		}

		writer.println("</"+dbName+">");
	}