private void printRelationship(ORASSNode node1, ORASSNode node2, List<NodeRelationship> nodeRels, CachedRowSet data, String ID, int indentation) throws MainException{
		try{
			int n = nodeRels.size();
			String relName = "";
			String table1 = node1.getName();
			String table2 = node2.getName();
			List<String> cols1 = keyMaps.get(table1);
			List<String> cols2 = keyMaps.get(table2);
			boolean shouldPrint = false;
			if(n==1){
				shouldPrint = true;
			}else{
				for(int i=0; i<nodeRels.size(); i++){
					NodeRelationship nodeRel = nodeRels.get(i);
					String relTable2 = nodeRel.getTable2();
					if(relTable2.equals(table1)){
						shouldPrint = true;
					}
					relName = nodeRel.getTable1();
				}
			}
			List<ColumnDetail> relCols = node2.getRelAttributes();
			int m = relCols.size();
			while(data.next()){
				List<String> pkValues = getSelectedVals(table1, cols1, data);
				String currID = this.getTupleID(table1, pkValues);
				if(ID.equals(currID) && shouldPrint){
					// Print ID reference of the relationship
					List<String> pkValues2 = getSelectedVals(table2, cols2, data);
					String refID = this.getTupleID(table2, pkValues2);
					printTabs(indentation);
					if(m==0){
						writer.print("<"+table2+" " +table2+"_Ref=\""+refID+"\">");
						writer.println("</"+table2+">");
					}else{
						writer.println("<"+table2+" " +table2+"_Ref=\""+refID+"\">");
					}


					// Print relationship attributes
					for(int i=0; i<relCols.size(); i++){
						ColumnDetail col= relCols.get(i);

						String tName = col.getTableName();
						if(tName.equals(relName)){
							String colName = col.getName();
							String colVal = data.getString(colName);
							printTabs(indentation+1);
							writer.print("<"+colName+">"+colVal);
							writer.println("</"+colName+">");
						}
					}
					if(m>0){
						printTabs(indentation);
						writer.println("</"+table2+">");
					}
				}
			}
		}catch(SQLException ex){
			throw new MainException(ex.getMessage());
		}
	}