从html字符串解析表 [英] parse table from html string
问题描述
我可以使用 html agilty pack
获取网页的html代码。
代码是这样的。
var table = doc.DocumentNode。 SelectNodes( // table [@ id ='fixTable']);
for ( int i = 0 ; i < table.Count; i ++)
{
string text = table [i] .InnerHtml;
// txtblk.Text = doc.Load(text);
var htmlConcat = string .Format( < html>< body> {0} + < /体>< / HTML> 中跨度>,文本);
}
现在,我要显示,整个表格在Windows手机屏幕上。
我对windows phone不太了解,
所以我应该使用Text Block吗?
我没有运气。
就像我们在asp.net中一样,将数据表分配给网格,有什么简单的方法吗?
我们是否应该使用任何Grid控件?
调试时,如果我选择文本并使用HTML可视化工具查看它,它完美的我想。但我不知道如何在Windows手机中显示...
您需要查看以下链接:
http://forums.asp.net/t/1915798.aspx [ ^ ]
如何在C#.net 中读取html表[ ^ ]
将HTML表格转换为数据集 [ ^
Hi,
I am able to get the html code of a webpage,using html agilty pack
.
code is this.
var table = doc.DocumentNode.SelectNodes("//table[@id='fixTable']");
for (int i = 0; i < table.Count; i++)
{
string text = table[i].InnerHtml;
//txtblk.Text = doc.Load(text);
var htmlConcat = string.Format("<html><body>{0}" +"</body></html>",text);
}
now, I want to display, this entire table on windows phone screen.
I don't know much about windows phone,
so shall I use Text Block?
i had no luck with it.
Like we do in asp.net, assigning data table to grid, is there any simple way out?
like shall we use any Grid control?
while debugging, if i select text and view it using HTML visualizers, its perfect what i want. but i don't know how to display in windows phone and in what...
you need to review below links:
http://forums.asp.net/t/1915798.aspx[^]
how to read html table in C#.net[^]
Convert HTML tables to a DataSet[^]
这篇关于从html字符串解析表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!