Filter HTML tags from web text

Can applescript be written to filter HTML markup to make downloaded documents look normal text? Is there an example of this somewhere?

Thanks,

-Teo

Hi Teo,

Look at this page http://www.apple.com/applescript/guidebook/sbrt/pgs/sbrt.04.htm and the section titled Removing Markup Codes From Text

Best wishes

John M

You want some sort of HTML renderer. For plain text, use Safari; it’s simplest. Example:

tell application "Safari"
	open alias "MacHD:Users:foo:test.html"
	set txt to text of document 1
	close document 1
end tell
return txt