Solved

Convert HTML to text IN VB.Net.

Posted on 2014-01-20
2
938 Views
Last Modified: 2014-01-21
Hi Guys

I need to convert HTML TO TEXT.

Below is an example of HTML.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<STYLE><!-- p { margin-top: 0em; margin-bottom: 0em; font-family:"","serif"; } --></STYLE>

<META name=GENERATOR content="MSHTML 10.00.9200.16750"></HEAD>
<BODY>
<P>Hi there</P>
<P>&nbsp;</P>
<P>Why does this have to be so complicated.</P>
<P>&nbsp;</P>
<P>Cheers</P>
<P>Shezad</P>
<P>&nbsp;</P>
<P>&nbsp;</P></BODY></HTML>
0
Comment
Question by:Shezad Ahmed
2 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 39794658
From:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/ba388d58-6a6c-4039-ac2d-c7ef0ab721fe/html-content-convert-to-text?forum=wcf

It looks like you can use the html agility pack (http://htmlagilitypack.codeplex.com/):

Dim plainText as String = ConvertToPlainText(MyhtmlString)
0
 

Author Closing Comment

by:Shezad Ahmed
ID: 39796663
Thanks,

It worked a treat.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now