Open paakjis opened 5 years ago
It's interesting. I replaced string "<item>
" to "<item id="">
". And it works. Looks like it is waiting for id. Even tho all the id's are empty it works.
xml = xml.replace("<item>", "<item id=\"\">");
So after I replace, it looks like this:
<website>
<person>
<id_person>60</id_person>
<name>Peter</name>
<personal_items>
<item id="">
<id>165</id>
<name>Phone</name>
</item>
<item id="">
...
</item>
</personal_items>
</person>
<person>
...
</person>
</website>
I'm not closing, because its kind of a hack. Still would like to know what I'm doing wrong.
Now it looks like the API XML is wrong. They gave me a choice between broken JSON or this XML. Seems like I'll be working with XML.
Hi.
I'm having an issue while parsing an XML api response.
It's similar to this issue, but I can't change the XML like he did.
What am I doing wrong ?
My Error:
My XML:
My Model:
My Java code: