How to Convert HtmlData to String
-
Hello all, I am using C# 2.0, in my winApp. I am getting the HTML Data. I need this in string format. I don't want to use browser control. how to achieve this. anybody any sounds plz help me regards GV Ramana
-
Hello all, I am using C# 2.0, in my winApp. I am getting the HTML Data. I need this in string format. I don't want to use browser control. how to achieve this. anybody any sounds plz help me regards GV Ramana
How are you receiving the HTML data? If it's a stream, you can convert that to a string using some of the encoder classes in System.Text namespace.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Is Jesus the Jewish Messiah? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
How are you receiving the HTML data? If it's a stream, you can convert that to a string using some of the encoder classes in System.Text namespace.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Is Jesus the Jewish Messiah? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
thx for reply my application is mail reading appliclation, so mails will come in the form of html. this html i want to convert to normal data(string) how to do this regards GV Ramana
-
thx for reply my application is mail reading appliclation, so mails will come in the form of html. this html i want to convert to normal data(string) how to do this regards GV Ramana
The question is, how is the HTML data formatted? What type is the HTML data, in your .NET code? If it's binary, you'll need to convert it from byte[] to string using System.Text.Decoder and its derivatives.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Is Jesus the Jewish Messiah? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Hello all, I am using C# 2.0, in my winApp. I am getting the HTML Data. I need this in string format. I don't want to use browser control. how to achieve this. anybody any sounds plz help me regards GV Ramana
-
thx for reply my application is mail reading appliclation, so mails will come in the form of html. this html i want to convert to normal data(string) how to do this regards GV Ramana
Your problem is you are interpting the "normal data" to mean "string" which if it is in the form of Html *is not* string at all. After all, this page is all Html and it has far more stuff than just "string". So what is it that you are really after? If you just want to do raw text processing you might want to look at
WebRequest
/WebResponse
instead. -
Hi, StringParser is very good. but there is no constant html data. html data will comes differently. how to convet this. regards GV Ramana
-
Hi, StringParser is very good. but there is no constant html data. html data will comes differently. how to convet this. regards GV Ramana
I don't understand the sentence "there is no constant html data. html data will comes differently". But if you want an HTML-free version of a
string
that contains HTML, do this:string strWithHtml = "...";
string strWithoutHtml = StringParser.removeHtml (strWithHtml);/ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com
-
I don't understand the sentence "there is no constant html data. html data will comes differently". But if you want an HTML-free version of a
string
that contains HTML, do this:string strWithHtml = "...";
string strWithoutHtml = StringParser.removeHtml (strWithHtml);/ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com
sounds good. ravi, really ur parser is very good. plz send me links of other articles by you. regards GV Ramana