Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Looking for an optimized xpath expressions using concat function

$
0
0

I have an HTML file as below:

<li class="inactive">
  
  <a href="http://msdn.microsoft.com/dn338064" title="Connect">
    Connect
  </a>
  <div class="area">
    <div class="arrow">
    </div>
  </div>
  <div class="subNav">
    <ul>
      <li>
        <a href="http://msdn.microsoft.com/dn338452" title="Perspectives">
          Perspectives
        </a>
      </li>
      <li>
        <a href="http://events.msdn.microsoft.com/" title="Events">
          Events
        </a>
      </li>
      <li>
        <a href="http://social.msdn.microsoft.com/forums/" title="Forums">
          Forums
        </a>
      </li>
    </ul>
  </div>
  
</li>

I wrote the below xpath expression:

      concat((//div[@class='subNav']/ul/li/a)[2]," ",(//div[@class='subNav']/ul/li/a)[3])

Is this possible to write the above code in a more simplified way with xpath1.0 ?





Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>