Hi,
I am trying to read an xml file.It has some xhtml data as node value.I want to convert that to plain text to save into the database.
this is an example text:
Her social-climbing stepmother would give anything to have Madelyn Haywood betrothed to a future duke. But believes the brothers Devine to be nothing more than heartless rogues—especially Gabriel, whose rakish reputation precedes him. He is nothing more than a slave to passion, and she will not be conquered by his caresses—and yet his wicked ways tempt her so . . .
Could someone help me how can i convert this type of text to plain text.I want to get rid of that hexadecimal chars and html tags.
I tried this code.But not worked.
Dim sb.Append(schild.InnerText)
Dim sb As New StringBuilder
Dim sr As New StringWriter(sb)
Dim htr As New System.Web.UI.HtmlTextWriter(sr)
'c1.RenderControl(htr)
SbAboutbook.AppendLine(line)
Dim lines As String() = htr.InnerWriter.ToString().Split(New String() {vbCr & vbLf}, StringSplitOptions.None)
Dim SbAboutbook As New StringBuilder
For Each line As String In lines
SbAboutbook.AppendLine(line)
Next
blurb = SbAboutbook.ToString()
!--removed tag-->
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).