kod funkcije characters:
Code:
public void characters(char[] buf,int offset,int length){
String s=new String(buf,offset,length);
System.out.println("ch:"+curTag+s);
//curTag je XML tag izvucen iz startElement()
if(curTag=="ime" && s!=null){
((imena)(niz.lastElement())).setIme(s);
}
if(curTag=="prezime" && s!=null){
((imena)(niz.lastElement())).setPrezime(s);
}
if(curTag=="firma" && s!=null){
((imena)(niz.lastElement())).setFirma(s);
}
if(curTag=="tel" && s!=null){
((imena)(niz.lastElement())).setTel(s);
}
if(curTag=="mobtel" && s!=null){
((imena)(niz.lastElement())).setMob(s);
}
}
public void characters(char[] buf,int offset,int length){
String s=new String(buf,offset,length);
System.out.println("ch:"+curTag+s);
//curTag je XML tag izvucen iz startElement()
if(curTag=="ime" && s!=null){
((imena)(niz.lastElement())).setIme(s);
}
if(curTag=="prezime" && s!=null){
((imena)(niz.lastElement())).setPrezime(s);
}
if(curTag=="firma" && s!=null){
((imena)(niz.lastElement())).setFirma(s);
}
if(curTag=="tel" && s!=null){
((imena)(niz.lastElement())).setTel(s);
}
if(curTag=="mobtel" && s!=null){
((imena)(niz.lastElement())).setMob(s);
}
}