Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Constructing HtmlDocument from stream
2 replies. Latest Post by Amanda Wang - MSFT on October 8, 2008.
(0)
Tolik2
Member
6 points
36 Posts
10-06-2008 12:50 AM |
I'm reading an Html page as a stream and I already got a Stream object with it but how do I convert it to queryable HTML document object so I can get header and content from it? HtmlDocument doesn't seem to have constructor or Load method and all of the examples I found so far deal with host browser's page instead of arbitrary Html page.
10-06-2008 8:23 PM |
Does lack of replies here mean Html is not supposed to be parsed/constucted by Silverlight? :)
Amanda W...
All-Star
17241 points
1,466 Posts
10-08-2008 4:02 AM |
hi,
Tolik2:I'm reading an Html page as a stream and I already got a Stream object with it but how do I convert it to queryable HTML document object so I can get header and content from it?
Based on your description, you has read the Html page as a stream, so you can try to store the html document into a string variable, and then use regular expressions to get the get header and content from the string.
About the regular expressions, you can try to refer: http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(VS.80).aspx