467,915 Members | 1,352 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Inserting data to xml column

256MB
HI Friends

i am using sqlserver2005 .
I have column in my table with xml DataType .and while i am inserting data into it ,if '&' is there in data it is giving xml parser error as

"XML parsing: line 1, character 15, illegal name character"

i have idea that xml parsing & is represented as 'amp' , but i cannot do that
my requirement is to insert the data as it is.

ex:of my insert statement is

insert into dbo.XMLTest values ('~ABC; XXX ABC& !ABC');

is there any alternative way to insert "~ABC; XXX ABC& !ABC" in to xml column


Thanks
Dec 19 '08 #1
  • viewed: 2528
Share:
1 Reply
ck9663
Expert 2GB
Can you get the value into a nvarchar variable, manipulate it and store it back? Just make sure your string is a valid xml.

-- CK
Dec 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by fniles | last post: by
5 posts views Thread by dos360 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.