when GetContactsRequest's response in SOAP format is received the structure of that xml response is something like this.

<GetContactsResponse xmlns="urn:zimbraMail">
<cn id="680" fileAsStr="group1" d="1308612784000" rev="900" l="7">
<a n="nickname">group one</a>
<a n="type">group</a>
<a n="fileAs">8:group1</a>
<m value="user@zimbra.com" type="I"/>
<m value="282" type="C">
<cn id="282" fileAsStr="Smith, John" d="1308547353000" rev="27" l="7">
<a n="lastName">Smith</a>
<a n="email">jsmith@example.zimbra.com</a>
<a n="workURL">http://www.example.zimbra.com</a>
<a n="company">Zimbra</a>
<a n="workCountry">US</a>
<a n="workState">CA</a>
<a n="workPhone">(408) 123-4567</a>
<a n="firstName">Mark</a>
<m value="uid=user1,ou=people,dc=phoebe,dc=mbp" type="G">
<cn id="2a692f57-1a5b-4542-9f8e-28dfdd0e3f43:260" fileAsStr="Demo User One" d="1308626790000" rev="22" l="257">
<a n="createTimeStamp">20110620052132Z</a>
<a n="lastName">user1</a>
<a n="email">user1@phoebe.mbp</a>
<a n="zimbraId">b4bf7953-c10f-449e-b7fe-3df48eea36f8</a>
<a n="objectClass">inetOrgPerson</a>
<a n="objectClass">zimbraAccount</a>
<a n="objectClass">amavisAccount</a>
<a n="fullName">Demo User One</a>
<a n="dn">uid=user1,ou=people,dc=phoebe,dc=mbp</a>
<a n="workPhone">+1 650 555 1111</a>
<a n="modifyTimeStamp">20110620052229Z</a>
<a n="fileAs">8emo User One</a>

in above xml structure, fullname,firstname,birthdates have been used as attribute's value rather than saperate xml element. due to this parsing entire data with multiple fields is very difficult.cant we have structure something like this,

<cn id=""...>


Address fields like city,street are included as part of attribute's value of <a n=".."> element.so it could have been structurized differently somthing like this
<address type="home">

due to lack of proper structure of response format,parsing have to be done manually using if and else conditions. any suggestion on how to parse this specific response in JAVA? i currently use JAXB for parsing. but after getting list of element <a n="..."> i have to set details manually.