package uma2;
import tool.*;
import java.io.*;
public class pro {
int s,datanumber;
String[] data=new String[5000];
String[] name=new String[5000];
String[][] point=new String[200000][20];
public static void main(String[] args) {
pro test=new pro();
}
pro(){
int tr;
int m=0;
for(tr=0;tr<288;tr++){
readfile sub52=new readfile();
sub52.makedata("2014/"+tr+".txt","UTF-8");
data=sub52.data;
datanumber=sub52.datanumber;
int sx;
for(s=1;s<datanumber+1;s++){
data[s]=data[s].replace("R","R△");
data[s]=data[s].replace(" ","");
data[s]=data[s].replace(" ","");
data[s]=data[s].replace(" ","");
String[] x=data[s].split(",");
m=m+1;
for(sx=0;sx<x.length;sx++){
point[m][sx]=x[sx];
}
}
name[1]="着";
name[2]="番";
name[3]="馬名";
name[4]="総合指数";
name[5]="騎手";
name[6]="着差";
name[7]="今回指数";
name[8]="ペース";
name[9]="上がり";
name[10]="人気";
name[11]="単勝";
name[12]="位置取";
}
datanumber=m;
writexml("ren.txt");
}
void writexml(String file){
int s,sx;
try{
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file)));
for(s=1;s<datanumber+1;s++){
pw.print("<日付>");
pw.print(point[s][0]);
pw.print("</日付>");
pw.print("<レース>");
pw.print(point[s][1]);
pw.print("</レース>");
for(sx=1;sx<13;sx++){
pw.print("<");
pw.print(name[sx]);
pw.print(">");
pw.print(point[s][sx+1]);
pw.print("</");
pw.print(name[sx]);
pw.print(">");
}
pw.println("");
}
System.out.println("ファイルに書きこみました。");
pw.close();
} catch(IOException ep){ System.out.println("入出力エラーです。"); }
}
}
最終更新:2016年07月15日 01:20