HTML text filters, display control, utilities

E

_eee_

Does anyone have a pointer to code for:

1 Filtering text from html? (removing html tags, etc)

2 Displaying HTML in a windows form

or any other useful utilities for dealing with raw HTML.
 
R

Rick Strahl [MVP]

Displaying HTML In a Windows form - the easiest way is to use the Web
Browser control. Filtering text from XML is a bit trickier, but if you are
using the Web Browser control you can use the innerText property to get all
the text stripped off the tags returned. Not that that is terribly usful in
anything but the simplest HTML forms.


+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
 
E

_eee_

Displaying HTML In a Windows form - the easiest way is to use the Web
Browser control. Filtering text from XML is a bit trickier, but if you are
using the Web Browser control you can use the innerText property to get all
the text stripped off the tags returned. Not that that is terribly usful in
anything but the simplest HTML forms.

+++ Rick ---

Thanks, Rick. I had used that control before, but with MFC. That
project sent the browser to web-based URL's.

I didn't realize it could decode/display an in-memory html string.
Have you done this before? I didn't see calls for that. (Doesn't mean
that they aren't there)
 
R

Rick Strahl [MVP]

You can use the WebBrowser control to use local file Urls or if you have to
setting it via the MSHTML DOM (which requires a nother import)... However, I
would use files rather than DOM methods as you have more control over the
document (ie. you can get the headers in there which can't be done with an
already loaded document).

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top