class pro{
String com[]=new String[10000];
String code[]=new String[10000];
String xml[]=new String[10000];
String data[]=new String[1000];
int s,nysenumber;
String urlx,bun;
int[] x=new int[1000];
int[] y=new int[1000];
int xmlnumber,datanumber;
public static void main(String [] args) {
pro test=new pro();
}
pro(){
getcode gt=new getcode();
gt.makedata();
code=gt.code;
com=gt.com;
nysenumber=gt.nysenumber;
google goo=new google();
goo.makedata(code[100],"2005","May","2005","June");
bun=goo.bun;
xymaker(bun);
int spoint,sx,epoint,p1,p2;
spoint=0;
epoint=999;
sx=999;
for(s=1;s<xmlnumber;s++){
xml[s]=makexml(s,bun);
p1=xml[s].indexOf("Volume");
p2=xml[s].indexOf("var google");
if(p1==0)spoint=s;
if(p2>-1)sx=s;
if(sx<epoint)epoint=sx;
}
System.out.println(spoint);
System.out.println(epoint);
sx=0;
for(s=spoint+1;s<epoint;s++){
if(xml[s].length()>0)sx=sx+1;
if(xml[s].length()>0)data[sx]=xml[s];
}
datanumber=sx;
for(s=1;s<datanumber+1;s++){
System.out.println(data[s]);
}
}
String makexml(int s,String bun){
int p1,p2;
String x1;
p1=x[s];
p2=y[s];
x1=bun.substring(p1+1,p2);
return x1;
}
void xymaker(String str){
int p1;
int s;
s=1;
p1=str.indexOf(">");
x[1]=p1;
while(p1>-1){
p1=str.indexOf(">",p1+1);
if(p1>-1)s=s+1;
if(p1>-1)x[s]=p1;
}
xmlnumber=s;
for(s=1;s<xmlnumber;s++){
y[s]=str.indexOf("<",x[s]);
}
}
}
最終更新:2011年04月14日 10:43