title: Get span text inside <p> using vba
body: <p>I am trying to extract text of span inside <code>&lt;p&gt;</code> tag. My html looks like this   </p>
  
  <pre><code>&lt;p itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"&gt;
  
      &lt;span itemprop="streetAddress"&gt;
  
         addressline1,line2,town,postalcode
  
      &lt;/span&gt;
  
  &lt;/p&gt; 
  </code></pre>
  
  <p>My vba code is   </p>
  
  <pre><code>    Dim htmlele1 As HTMLDivElement
      For Each htmlele1 In doc.getElementsByTagName("span")
          If htmlele1.attributes.itemprop = "streetAddress" Then
              Range("c" &amp; i).Value = htmlele1.innerText
          End If
      Next
  </code></pre>
  
  <p>But its not working. How can i fetch span text with attribute</p>