How to parse this xml file in java to read all the attributes of this XML file in java?
<?xml version="1.0" encoding="UTF-8"?
<dsml:batchRequest xmlns:dsml="urn:oasis:names:tc:DSML:2:0:core"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance">
<dsml:addRequest dn="cn=stifford,ou=Users,o=data">
<attr name="objectclass"><value>top</value></attr>
<attr name="objectclass"><value>person</value></attr>
<attr name="objectclass"><value>organizationalPerson</value></attr>
<attr name="objectclass"><value>inetorgperson</value></attr>
<attr name="UID"><value>kevin985</value></attr>
<attr name="sn"><value>kevin</value></attr>
<attr name="givenName"><value>stifford</value></attr>
<attr name="telephoneNumber"><value>9852898994</value></attr>
<attr name="mail"><value>[email protected]</value></attr>