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

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.
 
M

MyndPhlyp

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top