NetTalk Central

Author Topic: Xhtml or html to pure text  (Read 5700 times)

linas@debetas.lt

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
    • Email
Xhtml or html to pure text
« on: November 14, 2011, 06:32:13 PM »
Hi ,

I need to clean up ffom xhtml and html all the html language markups, leaving just a plain text.

Possible solutions to share?

Linas

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Xhtml or html to pure text
« Reply #1 on: November 14, 2011, 10:23:15 PM »
StringTheory is probably the best way to start.
there's no "one line" command to do it, but the search/replace functions there are a good place to start.

Personally I've done it with StringTheory using the .RemoveAttributes method, then the .Replace method (but I had a limited set of tags to look for.)

cheers
Bruce

seanh

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • Email
Re: Xhtml or html to pure text
« Reply #2 on: August 29, 2019, 06:41:17 PM »
For the benefit of  those searching this sort of thing
there is now a .removeHTML method in stringtheory