I call method of another service and I recieve this kind of xml string:
<result state="0" code="04998121129111115327" transID="4444"
transTime="2012-11-29 11:11:14" regCode="040020275"
refCode="DZ053158110" meterNum="02003561710"
customerName="Jorsh Bush" tariffCode="02"
buyTimes="97" calcQty="37.4" vendQty="37.4"
vendAMT="9.7" supplyAMT="0.00" arrearAMT="0.00"
feeAMT="0" AMT="9.7" VAT="0" stampTax="0.00"
netAMT="9.7" commAMT="0.3" token="2761 9986 4217 4379 4463"
invoice="0000000544" verifyCode="6777e5da18c133d725c7dcd4153f5ca4"
checkCode="">
<power>
<item id="1" kwh="0" amt="0" price="0.1500"/>
<item id="2" kwh="37.4" amt="9.7" price="0.2600"/>
</power>
<fee/>
<arrear/>
</result>
This type of xml seems to me problematic, because data I need is in attrubutes(not in tags). Now, what is the best way to fit that kind of stuff into my java object?
I use xml schema to generate response class into which I try to convert xml string.