Skip to main content

Microsoft Silverlight

Answered Question Constructing HtmlDocument from streamRSS Feed

(0)

Tolik2
Tolik2

Member

Member

6 points

36 Posts

Constructing HtmlDocument from stream

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.

Tolik2
Tolik2

Member

Member

6 points

36 Posts

Re: Constructing HtmlDocument from stream

Does lack of replies here mean Html is not supposed to be parsed/constucted by Silverlight? :)

Amanda Wang - MSFT
Amanda W...

All-Star

All-Star

17241 points

1,466 Posts

Answered Question

Re: Constructing HtmlDocument from stream

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

Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities