Reputation: 171
What would be the easiest way to deserialize a response like the following?
<maxlist>8</maxlist>
<total>2</total>
<biller1>
<id>123</id>
<alias>BIMA</alias>
<name>Bima Insurance Agency</name>
<wallet>bima</wallet>
<category>insurance</category>
<operation>gcash</operation>
<fee>5</fee>
</biller1>
<biller2>
<id>124</id>
<alias>BILLER ALIAS</alias>
<name>BILLER NAME</name>
<wallet>BILLER CODE</wallet>
<category>BILLER CATEGORY</category>
<operation>gcash, parking or bancnet</operation>
<fee>5</fee>
</biller2>
This is all i get, as the response body for an http request. Is there an easy way to deserialize this using java?
Upvotes: 0
Views: 53
Reputation: 3795
Of course you can. You can use JAXB for that .
Hope it will help you :
http://www.mkyong.com/java/jaxb-hello-world-example/
Upvotes: 2