C#:Using XPath with DOM Tutorial

From Progzoo
Jump to: navigation, search
A portion of the file http://xmlzoo.net/casablanca.xml is as shown:
<table class="infobox vevent" cellspacing="2" style="width: 20em; text-align: left; font-size: 90%;">
  <tr class="description">...</tr>
      <a href="/wiki/Humphrey_Bogart" title="Humphrey Bogart">Humphrey Bogart</a>
      <a href="/wiki/Ingrid_Bergman" title="Ingrid Bergman">Ingrid Bergman</a>
      <a href="/wiki/Paul_Henreid" title="Paul Henreid">Paul Henreid</a>


You can use the SelectNodes method to apply an XPath expression.

Change the program so that it prints each of those "Starring" in casablanca.xml

[Font] [Default] [Show] [Resize] [History] [Profile]