0

I'm making a program using Visual Basic and Visual Studio 2013

enter image description here

On the left, names of players need to be typed. However, I would like to do this automatically.

Here is a snippet of a HTML file containing all the players' names and rankings:

<tr>
    <td align="left">1</td>
    <td align="left">Player 1</td>
    <td align="center">1</td>
    <td align="center">3/0/0</td>
    <td align="center">9</td>
    <td align="center">41.67%</td>
    <td align="center">62.97%</td>
    <td align="center">&nbsp;</td>
</tr>

<tr>
    <td align="left">2</td>
    <td align="left">Player 2</td>
    <td align="center">1</td>
    <td align="center">2/1/0</td>
    <td align="center">6</td>
    <td align="center">66.67%</td>
    <td align="center">50.00%</td>
    <td align="center">&nbsp;</td>
</tr>

<tr>
    <td align="left">3</td>
    <td align="left">Player 3</td>
    <td align="center">1</td>
    <td align="center">2/1/0</td>
    <td align="center">6</td>
    <td align="center">55.56%</td>
    <td align="center">50.93%</td>
    <td align="center">&nbsp;</td>
</tr>

Is there a way I can import and use that to automatically insert player names for me? enter image description here

PS. I also have a tdf file to my disposal. Here is the part that I am interested in:

<standings>
    <pod category="2" type="finished">
        <player id="1070903" place="1" />
        <player id="1070904" place="2" />
        <player id="1070906" place="3" />
        <player id="1070901" place="4" />
        <player id="1070923" place="5" />
        <player id="1070905" place="6" />
        <player id="1070924" place="7" />
        <player id="1070912" place="8" />
    </pod>
    <pod category="2" type="dnf">
    </pod>
    <pod category="1" type="finished">
    </pod>
    <pod category="1" type="dnf">
    </pod>
    <pod category="0" type="finished">
    </pod>
    <pod category="0" type="dnf">
    </pod>
</standings>

Is there a way I could import the player IDs, in that order?

user247702
  • 23,641
  • 15
  • 110
  • 157
Mierzen
  • 566
  • 1
  • 5
  • 25
  • Displaying HTML requires a browser. You can use the WebBrowser control and its DocumentText property. It is very inefficient. – Hans Passant Apr 26 '14 at 12:56
  • @Hans I don't think the question is about displaying HTML, but about parsing HTML into a data structure. – user247702 Apr 26 '14 at 13:26

1 Answers1

0

I think the better way is to use XmlReader and parse the TDF file with it.