I am trying to create elements from an xml using simple xml for android and I am not interested in the root, but only some nested elements. I am only interested in getting account object from the below xml.
<response xmlns="http://abc.abcdef.com/rest/xyz">
<request>
<channel>334892326</channel>
<number>486</number>
</request>
<status>
<code>200</code>
</status>
<results>
<account>
<creationTimestamp>2014-01-12T1:31:07Z</creationTimestamp>
<category>
<type>User-1</type>
<name>User-1</name>
</category>
</account>
<results>
</response>
I have tried the following in the bean, but my resulting object is containing all values as null.
@Root(strict = false, name = "account")
@Path("response/results/account")
public class Account implements Serializable {
@Element(required = false)
private String creationTimestamp;
@Element(required = false)
private Category category;
}