title: Selecting children of parent, based on other child
body: <p>Using HTMLAgilityPack I am trying to generate a list of clickable objects, using the function FindElementsByXPath, based on below structure.</p>
  
  <pre><code>&lt;div class = "table-container"&gt;
      &lt;div&gt;  
              &lt;strong&gt;
                  &lt;a&gt;Txt&lt;a/&gt;
              &lt;/strong&gt;
      &lt;/div&gt;
      &lt;Table class="sc" style="display: None;"&gt;  
      &lt;/Table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The problem however is that I only want to include the deepest-level a-tag if the table has the style-attribute set to "display: None;" (note that if the table is already expanded, the style attribute does not exist).</p>
  
  <p>I am trying to generate an XPath expression that would help me achieve this. So far, I have made this:</p>
  
  <pre><code>//*[@class='table-container' and table[contains(@style,'display: None;')]]/div/strong/a
  </code></pre>
  
  <p>However, this is not working. I tried to search for the solution online and experimented with various settings, but no luck so far. I am new to XPath selectors and find myself stuck at this moment. Any help would be appreciated.</p>