title: How to use SAX parse xml with the same tag and multi-attribute
body: <p>When I use SAX to parse this XML,I don't know how to get this three "link" tag's href attributes value by the three different "rel" attributes.</p>
  
  <pre><code>&lt;entry&gt;
  &lt;title&gt;ahbei&lt;/title&gt;
  &lt;link href="http://api.douban.com/people/1000001" rel="self" /&gt;
  &lt;link href="http://www.douban.com/people/ahbei/" rel="alternate" /&gt;
  &lt;link href="http://img3.douban.com/icon/u1000001-20.jpg" rel="icon" /&gt;
  &lt;uri&gt;http://api.douban.com/people/1000001&lt;/uri&gt;
  &lt;/entry&gt;
  </code></pre>
  
  <p>I can't get the "http://img3.douban.com/icon/u1000001-20.jpg" by this code.</p>
  
  <pre><code>public void startElement(String uri, String localName, String qName,
              Attributes atts) throws SAXException {
  
          if (localName.equals("link") &amp;&amp; (atts.getValue("rel") == "icon"))  // (*)
          {
              NowState = DBU_icon_url;
              DouBanUser.setIcon(atts.getValue(0));   
              return;
          }
  
      }
  </code></pre>
  
  <p>Thank you.</p>
  
  <hr>
  
  <p>change
  "<code>if (localName.equals("link") &amp;&amp; (atts.getValue("rel") == "icon"))</code>"
  =>
  "<code>if (localName.equals("link") &amp;&amp; atts.getValue("rel").equals("icon"))</code>"</p>