Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Convert HTML to text IN VB.Net.

Posted on 2014-01-20
2
Medium Priority
?
1,429 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 41

Accepted Solution

by:
Kyle Abrahams earned 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

604 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