class pro{
String bun,word;
String urlx;
int[] x=new int[1000];
int[] y=new int[1000];
int s,xmlnumber;
String[] xml=new String[1000];
String[] credit=new String[1000];
public static void main(String args[]){
pro test=new pro();
}
pro(){
urlx="http://saayaworld.blog70.fc2.com/?xml";
getdata gt=new getdata();
gt.makedata(urlx);
bun=gt.data;
xymaker(bun);
xmlmaker(bun);
creditmaker(bun);
for(s=1;s<xmlnumber;s++){
System.out.println(s);
System.out.println(credit[s]);
}
word=credit[184];
System.out.println(word);
yahoo yh=new yahoo();
bun=yh.makedata(word);
System.out.println(bun);
}
void creditmaker(String str){
int p1,p2;
for(s=1;s<xmlnumber;s++){
p1=y[s];
p2=x[s+1];
xml[s]="";
if(p2>p1)credit[s]=str.substring(p1+1,p2);
}
}
void xmlmaker(String str){
int p1,p2;
for(s=1;s<xmlnumber+1;s++){
p1=x[s];
p2=y[s];
xml[s]="";
if(p2>p1)xml[s]=str.substring(p1+1,p2);
}
}
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+1;s++){
y[s]=str.indexOf(">",x[s]);
}
}
}
最終更新:2011年04月21日 01:19