title: Xpath query with multiple conditions in XML
body: <p>(Due to sensitivity of the XML data I am working with, I had to remove the data on it. The original size of the XML was 15MB).</p>
  
  <p>Below is the XML that i'm trying to query the count of Funds elements/nodes that have <strong>"|40|" as substring in <code>FundGroupIDConcat</code></strong> attribute and <strong><code>PegStatusCurr = 1</code></strong></p>
  
  <p>I tried to evaluate this query and failed to get it running. (I'm running this is VB.NET)</p>
  
  <pre><code>(count(.//FundGroups/FundGroup/FundGroups/FundGroup/FundList/Fund[@PegStatusCurr ,""1"")&gt;0)
  </code></pre>
  
  <p>XML:</p>
  
  <pre><code>&lt;FR&gt;
      &lt;FundGroups&gt;
          &lt;FundGroup FundGroupID="-1" FundGroupIDConcat="-1|" &gt;
              &lt;FundGroups&gt;
                  &lt;FundGroup FundGroupID="100" FundGroupIDConcat="-1|100|"&gt;
                      &lt;FundList&gt;
                          &lt;Fund PegStatusCurr="1" PegStatusNew="1"&gt;
                              &lt;Name&gt;Account&lt;/Name&gt;
                          &lt;/Fund&gt;
                      &lt;/FundList&gt;
                  &lt;/FundGroup&gt;
                  &lt;FundGroup FundGroupID="7" FundGroupIDConcat="-1|7|"&gt;
                      &lt;FundGroups&gt;
                          &lt;FundGroup FundGroupID="40" FundGroupIDConcat="-1|7|40|"&gt;
                              &lt;FundGroups&gt;
                                  &lt;FundGroup FundGroupID="3240" FundGroupIDConcat="-1|7|40|3240|"&gt;
                                      &lt;FundList&gt;
                                          &lt;Fund PegStatusCurr="1" PegStatusNew="1"&gt;
                                              &lt;Name&gt;Century One&lt;/Name&gt;
                                          &lt;/Fund&gt;
                                          &lt;Fund PegStatusCurr="2" PegStatusNew="2"&gt;
                                              &lt;Name&gt;Century Two&lt;/Name&gt;
                                          &lt;/Fund&gt;
                                      &lt;/FundList&gt;
                                  &lt;/FundGroup&gt;
                              &lt;/FundGroups&gt;
                          &lt;/FundGroup&gt;                        
                      &lt;/FundGroups&gt;
                  &lt;/FundGroup&gt;
              &lt;/FundGroups&gt;
          &lt;/FundGroup&gt;
      &lt;/FundGroups&gt;
  &lt;/FR&gt;
  </code></pre>
  
  <p>I'm very new to XPath Query and I am having trouble fixing it.</p>