title: getting values from html rules using Java
body: <p>for example i will give a sample source code of Amazon.com site and this is my html rules.</p>
  
  <pre><code>&lt;div id="result_25" class="fstRowGrid prod celwidget" name="B00IVPU786"&gt;
      &lt;div class="image imageContainer"&gt;
          &lt;a href="https://rads.stackoverflow.com/amzn/click/com/B00IVPU786" rel="nofollow noreferrer"&gt;&lt;div class="imageBox"&gt;
      &lt;img onload="viewCompleteImageLoaded(this, new Date().getTime(), 24, false);" src="http://ecx.images-amazon.com/images/I/41SmukivM1L._AA160_.jpg"  class="productImage cfMarker" alt="Product Details" /&gt;
          &lt;/div&gt;&lt;/a&gt;
  
  &lt;span class="lrg bold"&gt;Samsung Electronics 32GB EVO Micro SDHC with Adapter Upto 48MB/s Class 10 Memory Card (MB-MP32DA/AM)&lt;/span&gt;&lt;/a&gt; &lt;/h3&gt;&lt;ul class="rsltGridList grey"&gt;
  </code></pre>
  
  <p>i used the below code to get the data</p>
  
  <pre><code>Elements e = d.select("div[id=result_25]");
  
  String firstURL = e.select("a").attr("href");
  String secondURL = e.select("img").attr("src");
  </code></pre>
  
  <p>this is how i got two URL from this. But i want this "Samsung Electronics 32GB EVO Micro SDHC with Adapter Upto 48MB/s Class 10 Memory Card (MB-MP32DA/AM)" which is coming under span when i used <code>String name = e.select("span").attr(null);</code> i am getting error and when i used <code>String name = e.select("span").attr(class);</code> i am getting class name bld lrg as output. how can i do this.</p>