title: Accessing a certain attribute's value within a <tr> with HtmlAgilityPack
body: <p>I am scraping a web page and I am finding trouble accessing the value of an attribute within a <code>&lt;tr&gt;</code> tag in the OuterHTML of a node.</p>
  <pre><code>&lt;tr data-descr=&quot;Revit+SA+regression+-+Obj&quot; data-ids=&quot;2571302&quot;&gt;
  </code></pre>
  <p>The above HTML contains the attribute <code>data-ids</code> which I am trying to get the value of.
  Below is the code for accessing the web page (I would like to point out that I am deeply sorry for the lack of a reproductible example due to the web page not being accessible to the public) and reaching the node containing certain keywords that I wanted to investigate.</p>
  <pre><code>HtmlWeb web = new HtmlWeb();
  HtmlDocument document = web.Load(&quot;WebPageIsPrivate&quot;);
  HtmlNode[] nodes = document.DocumentNode.SelectNodes(&quot;//tr&quot;)
              .Where(x =&gt; x.InnerHtml.Contains(&quot;Revit&quot;) &amp; x.InnerHtml.Contains(&quot;regression&quot;)).ToArray();
  </code></pre>
  <p>At this point, I figured that I can use <code>nodes.OuterHtml.ToString()</code> to get the HTML above. However, this would mean that I'd have to replace the string's characters until I only have the <code>2571302</code> (in this example) left. I am wondering whether there's an easier way of getting to that value.</p>
  <p>Please let me know if the post is not clear enough to the reader and requires more details - I will do my best to provide them. Documentation on this subject is also highly welcome.</p>
  <p>Thank you.</p>