Solved

Convert HTML to text IN VB.Net.

Posted on 2014-01-20
2
1,219 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 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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

717 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