xml - Android problem with ArrayList of objects in SAX-parser -
i'm trying parse xml page build this: http://pastebin.com/t9cxdngs. i've implemented basic sax parser, following tutorial: anddev sax tutorial.
it worked pretty well, except i'm getting values of last tag. solve this, i've implemented arraylist add each object that's made per xml node. i'm getting weird output. each node passes in loop, adds same value again. node 1, value once, node 2, value twice , on... (example: value1, value2value2, value3value3value3)
i can't seem figure out what's wrong...
here's full source code of page: http://pastebin.com/bkyz0g1u
you re-using same object on , on again, ever add 1 object arraylist. replace line:
private vacature vacature = new vacature(); with
private vacature vacature; and add line:
vacature = new vacature(); right after declaration of characters() method:
public void characters(char ch[], int start, int length) { i suspect getvacatures() should return arraylist arrayvaca.
Comments
Post a Comment