PDA

View Full Version : Use SgmlReader to get html text



dfeez
05-07-2009, 07:01 PM
Hello

Is it possible to use SgmlReader to take a string of HTML and remove all HTML Tags and formatting so that I can have only the inner text of the HTML page? If so, do you have an example? Thanks

SteveB
05-07-2009, 07:13 PM
Yes, use the sgmlreader to convert the string into xml and then use the InnerText property to extract all the text contained in it.

Check out the SgmlReader page (http://developer.mindtouch.com/Community/SgmlReader) to see how to use it.