Question regarding xml character

  • Thread starter Thread starter archana
  • Start date Start date
A

archana

Hi all,

I am having xml text containing ' and < character. I am replace '
with &apos; and < with &lt;.

then i am exporting that to excel in asp.net. but after opening i am
getting &apos as it is and &lt; is replced properly with <. can anyone
tel me why this is happening.

any help will be truly appreciated.

thanks in advance.
 
I am having xml text containing ' and < character. I am replace '
with &apos; and < with &lt;.

then i am exporting that to excel in asp.net. but after opening i am
getting &apos as it is and &lt; is replced properly with <. can anyone
tel me why this is happening.

What does the actual XML look like when written to disk? (We only need to
see a sample of a node which contains these escaped characters.)
 
archana said:
I am having xml text containing ' and < character. I am replace '
with &apos; and < with &lt;.

then i am exporting that to excel in asp.net. but after opening i am
getting &apos as it is and &lt; is replced properly with <. can anyone
tel me why this is happening.

First of all, you do not have to escape the single quote, unless you use
it in an attribute value that is delimited by single quotes e.g.
<foo att1='&apos;'/>
So it might be that you can solve the problem by simply not escaping the
single quote.

How exactly do you export your XML to Excel?
 
Back
Top