On line 99 in your XML helper you only create a new item object if the element’s name is item
.
Then in endElement(...)
, you set the title if the name is title
.
So you encountered a title
element which is not inside an item
element, before creating the first item.
You should probably add an extra check if item
is not null.
Also null the item
out to avoid unexpected data.
0
solved Null Object Reference with setters and getters SAXParser Android [duplicate]