Issues in Parsing XML

Olsonrog

New Member
I have already existing classes,I want to check whether there is any way to map the following XML into existing class.Existing XML(jdom Element)\[code\] <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Details><Uniqueno>11111</Uniqueno><ROWSET name="Persons"><ROW num="1"><Name>60821894</Name><Age>938338789</Age></ROW><ROW num="2"><Name>60821894</Name><Age>938338789</Age></ROW></ROWSET></Details>\[/code\]Existing Class\[code\] @XmlRootElement(name = "Details") @XmlAccessorType(XmlAccessType.FIELD) class Details{ @XmlElement(name="Uniqueno") String Uniqueno; @XmlElement(name="ROWSET") private Persons[] persons; //setters & getters } @XmlRootElement(name = "Persons") @XmlAccessorType(XmlAccessType.FIELD) class Persons{ @XmlElement(name="name") String name; @XmlElement(name="age") String age; //setters & getters }\[/code\]The issue with which I am stuck is:I have a ROW num in XML which is not able to be mapped,Is any way to map the corresponding class without changing the structure of XML?
 
Back
Top