public static void processLines(ArrayList<String> listaFiles, String folder) {

		String[] XMLS=new String[listaFiles.size()];
		
		int counter=1;
		int iterador = 0;
		for (String linea2 : listaFiles) {	
			System.out.println("Record "+counter+"..."+listaFiles.size());
			counter++;
			try {
				URL url = new URL("http://catalog.hathitrust.org/Record/"+linea2+".xml");
				HttpURLConnection conn = (HttpURLConnection) url.openConnection();
				conn.setRequestMethod("GET");
				conn.setRequestProperty("Accept", "application/json");
		 
				if (conn.getResponseCode() != 200) {
					throw new RuntimeException("Failed : HTTP error code : "
							+ conn.getResponseCode());
				}
		 
				BufferedReader br2 = new BufferedReader(new InputStreamReader(
					(conn.getInputStream())));
		 
				StringBuffer output=new StringBuffer();

				String LineaT=null;
				
				while ((LineaT = br2.readLine()) != null) {
					System.out.println(LineaT);
					output.append(LineaT);
				}
				
				
				String Result=output.toString();
				
				
				FileWriter fichero = null;
		        PrintWriter pw = null;
		        try
		        {
		        	File D=new File("Result/"+folder+"/");
		        	D.mkdirs();
		            fichero = new FileWriter("Result/"+folder+"/"+linea2+".xml");
		            pw = new PrintWriter(fichero);
		            pw.println(Result);
				
		        } catch (Exception e) {
		            e.printStackTrace();
		        } finally {
		           try {
		           if (null != fichero)
		              fichero.close();
		           } catch (Exception e2) {
		              e2.printStackTrace();
		           }
		        }

		     
				
				XMLS[iterador]=Result;
				

		      iterador++;
				
				conn.disconnect();
			} catch (Exception e3) {
				System.err.println("Error en Elemento " + linea2 );
				e3.printStackTrace();
			}
			
		}
    	
		 try {
			mainMerge(XMLS, folder);
		} catch (Exception e) {
			e.printStackTrace();
		}
	
		
	}