0

I am working on an application in which requirement is to replace specific word with a tag inside a line.

For example consider following line

became an accomplished singer, musician, and hymn writer 1

1 is replace with some text and final output should be like as shown below in xml

     <ln coord="25.78:338.56:318.35:346.89" page="1" height="574.98" left="25.78" 
top="338.56" font="CrimsonText-Roman" fontsize="12.5" fonttype="Embeded">
        became an accomplished singer, musician, and hymn writer in 
    <footnote id='1'>1 </footnote> </ln>

I have tried following code

Line.InnerXml.Replace("&lt;", "<").Replace("&gt;", ">");

But still get the following output in xml

 <ln coord="25.78:338.56:318.35:346.89" page="1" height="574.98" left="25.78" 
    top="338.56" font="CrimsonText-Roman" fontsize="12.5" fonttype="Embeded">
            became an accomplished singer, musician, and hymn writer in 
        &lt;footnote id='1'&gt;1 &lt;/footnote&gt; </ln>

How to get required output in xml.

mck
  • 978
  • 3
  • 14
  • 38

1 Answers1

1

This problem was allready solved in this post

Look at HttpUtility.HtmlDecode

Community
  • 1
  • 1
Martin Godzina
  • 1,470
  • 11
  • 17