1

enter image description here

how can i capture the status and message tags from this xml response

String
  • 3,660
  • 10
  • 43
  • 66
  • https://www.nabisoft.com/tutorials/java-ee/producing-and-consuming-json-or-xml-in-java-rest-services-with-jersey-and-jackson – user3719857 Apr 28 '16 at 09:57
  • Here is what you need : http://stackoverflow.com/questions/4138754/getting-an-attribute-value-in-xml-element – Ruudy Garcia Apr 28 '16 at 10:05
  • but iam getting error: Premature end of file. XML document structures must start and end within the same entity. – String Apr 28 '16 at 10:44

1 Answers1

0

You can use JAXB

In Spring 3, one of the feature of mvc:annotation-driven, is support for convert object to/from XML file, if JAXB is in project classpath.

Here SpringGuide for marshalling and demarshalling object to xml and vice versa.

mirmdasif
  • 6,014
  • 2
  • 22
  • 28