HtmlAgility - save string parsing

I just tried using the HtmlAgility Pack for the first time and there were problems.

First, I boot from a string variable.

string NewsText = dr["Message"].ToString(); HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument(); htmlDoc.LoadHtml(NewsText); //doing my stuff... 

Then I want to save the changes to the NewsText line. How should I do it? htmlDoc.toString () does not work.

Thank!

+22
c # parsing html-parsing
Feb 24 '11 at 16:15
source share
1 answer

You are looking for htmlDoc.DocumentNode.OuterHtml .

+57
Feb 24 '11 at 16:17
source share



All Articles