title: How can I read Xml attributes using Java?
body: <p>Given an xml document that looks like the following:</p>
  
  <pre class="lang-xml prettyprint-override"><code> &lt;?xml version="1.0"?&gt;
       &lt;xml_api_reply version="1"&gt;
        &lt;weather section="0" row="0" mobile_zipped="1" mobile_row="0"     tab_id="0" module_id="0"&gt;
          &lt;forecast_information&gt;
              &lt;city data="Cordova, Andalusia"/&gt;
              &lt;postal_code data="cordoba"/&gt;
              &lt;latitude_e6 data=""/&gt;
              &lt;longitude_e6 data=""/&gt;
              &lt;forecast_date data="2012-07-18"/&gt;
              &lt;current_date_time data="1970-01-01 00:00:00 +0000"/&gt;
              &lt;unit_system data="SI"/&gt;
           &lt;/forecast_information&gt;
  </code></pre>
  
  <p>I want to show <strong>city data</strong>, <strong>postal_code</strong> and <strong>date</strong> attributes with help of <code>System.out.println()</code>.</p>
  
  <p>Any idea?</p>