Special Characters(&,etc..) in a string between xml tags

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a xml open and close tag <abc> </abc>. I assign a string variable to
this tag. <abc> & NAT & </abc> . The value of the variable NAT = Cal&FLo. But
due to the presence of the ampersand. There is an exception. What do I need
to do to display & nd other special chracters correctly in xml tags.
 
NAT said:
I have a xml open and close tag <abc> </abc>. I assign a string variable to
this tag. <abc> & NAT & </abc> . The value of the variable NAT = Cal&FLo. But
due to the presence of the ampersand. There is an exception. What do I need
to do to display & nd other special chracters correctly in xml tags.

See if this helps...

http://www.w3.org/TR/xhtml1/

See: Section C.12 - Using Ampersands in Attribute Values (and Elsewhere)

....or, for the impatient, try using &amp; instead of the ampersand
character.
 
Back
Top