0

I have the following response format for XML

<idxml>
<Status>Error</Status>
<Msisdn/>
<OperatorCode/>
<OrderId/>
<Details>invalid date</Details>
<Signature/>
</idxml>

It would be helpful if you can create a class file for this XML response using retrofit. Thanks is advance.

Vidhi Dave
  • 5,614
  • 2
  • 33
  • 55
bhaskar
  • 991
  • 1
  • 15
  • 37
  • refer this https://www.mytrendin.com/parsing-xml-data-using-retrofit2-api/ – Akshay Feb 01 '18 at 09:11
  • take a look here at the answer here : https://stackoverflow.com/questions/25380280/how-to-use-retrofit-and-simplexml-together-in-downloading-and-parsing-an-xml-fil – Ali Asadi Feb 01 '18 at 09:14
  • @Akshay I was using the same but the XML format is different and I am confused creating the class for my response – bhaskar Feb 01 '18 at 09:20
  • 1
    your class will be like: ` @Root(name = "idxml) public class ParentAttr{ @Element private String Status; @Element private String Msisdn; @Element private String OperatorCode; @Element private String Details; @Element private String Signature; }` – Akshay Feb 01 '18 at 12:05

0 Answers0