我尝试使用DOM从HTML获取数据。我可以得到一些数据,但无法弄清楚如何得到其余数据。这是一张突出显示我想要的数据的图片。
http://i.imgur.com/Es51s5s.png
这是代码本身
这里是我的PHP代码
private void NotifyPropertyChanged([CallerMemberName] string info = null)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
MessageBox.Show(info);
}
}
public string Name
{
get { return _name; }
set
{
_name = value;
NotifyPropertyChanged(); //now no need to specify
}
}
答案 0 :(得分:0)
我使用了以下课程。 http://sourceforge.net/projects/simplehtmldom/
这是一个非常简单易用的课程。
您可以使用
$html->find('#RosterReport > tbody', 0);
找到具体的表格
$html->find('tr')
$html->find('td')
查找表格行或列
注意$ html是变量有完整的html dom内容。