May 26, 2006 at 7:57 am
Hi,
I stored some data in Sql server, which contains special characters. When I am retrieve the data in xml format, the special characters are converting into text.
Ex: I have a Items table with the following information.
Items Table
ItemNo ItemName
1 CRAZY PERU & Alpa’ca Beanie”
Select Query
Select * from Items for xml raw
Result of Query is
<row id="51520" name="CRAZY
Here the special characters & is displaying as & singlequote(‘) is displaying as ' double quotes(“) are displaying as "
But I want to displaying the result without converting in the following format:-
<row id="51520" name="CRAZY PERU & Alpa’ca Beanie”"/>
Please let us know how to display it.
Thanks and regards,
Thirumalaraj.
May 26, 2006 at 11:06 am
The ampersand, apostrophe, and quote, as well as less than and greater than ( < and > ) are reserved characters in standard XML format. Many tools that expect XML input will choke if they are not "escaped" as you noticed above.
What are you using to display them? There are likely workarounds, but without more info it's hard to tell you what to do.
May 27, 2006 at 2:35 am
Hi,
I am dispalying this data on the web page, which is ASP.NET Application. So, can you please tell me, how to display this data on the web page, without converting this characters in to the text.
Thanks and regards,
Thirumalaraj.
May 27, 2006 at 6:52 pm
While I'm not an ASP developer, MS products all seem to handle xml files just fine, so you shouldn't have to do anything. The XML parser should convert & right back into an ampersand, etc.
I guess I don't understand why these special characters are a problem for you, as they are standard reserved characters. Can you explain which piece of the process doesn't like them, what that piece does, what it's written it, how it's reading the .xml files, etc?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply