This project has moved and is read-only. For the latest updates, please go here.

Getting information on specific fields of length N in a html file using xpath And placing them in some textbox

Topics: Developer Forum, Project Management Forum, User Forum
Aug 29, 2013 at 10:15 PM
Hello my dear friends at codeplex I am a novice programmer I'm working on a project that takes a set of data from a series Html file with the same format but with different values ​​I put in some textbox I already used the search function and file operations I do it But because the values ​​are different length in some cases I was having Trouble! After some searching on the internet site and stackoverflow. I noticed there "xpath" and your component(htmlagilitypack) But I do not know how Getting information on specific fields of length N in a html file using xpath my html file in this Format:my html file

I need to have field values ​​that I showed with word "this number" or "this Field" in my html i need get value of The fields with xpath addres(i i use firebug or inspect element in choreme) and put them to some text box in tanx a a lot.

for exp see this code
Imports System.Data
Imports System.Net
Imports System.Collections
Imports System.Collections.Specialized
Imports System.Text
Imports System.Text.RegularExpressions
Imports HtmlAgilityPack
Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim doc = New HtmlAgilityPack.HtmlDocument
        Dim strAnswer As String = ""

        'this number (1)
        Dim a As HtmlAgilityPack.HtmlNode =
        RichTextBox1.Text = a.InnerText.ToString ''but dont work!!!!

        'this filed(1)
        Dim b As HtmlAgilityPack.HtmlNode =
        RichTextBox2.Text = b.InnerText.ToString ''but dont work!!!!

        'this number(2)
        Dim c As HtmlAgilityPack.HtmlNode =
        RichTextBox3.Text = c.InnerText.ToString ''but dont work!!!!
        ' and ...
        ' i use firebug 
        'this code dont work plz help me
    End Sub
End Class
     i use firebug 
    tnx alot