October 19, 2009 at 9:01 am
Hi,
I hard coded the XML elements and attributes and one of my XML file falied because I have value that contained predifined XML character "<" and "=" . For example below the 30.6 contain "<=" sign which is a predefined XML characters:
<Soda sugar =(<=30.6 mg) />
Bear in mind this XML element is hard coded with a value that is variable using a store prodcedure. Is there a way to fix this problem without revamp the Store prodcedure? Thanks.
October 21, 2009 at 4:05 am
Have you tried googling for XML escape characters?
How are you importing the XML into SQL Server? Via SSIS or another method?
October 21, 2009 at 7:07 am
yes I found my solution. Here is the website
http://www.fao.org/docrep/008/ae908e/ae908e06.htm
Thanks.
October 21, 2009 at 8:12 am
Thanks for posting your solution. That's a nice document.
So are you going to force the actual xml file to include the those entity references instead of the < and = signs? Or are you going to parse it later on?
October 21, 2009 at 8:51 am
What I am going to do is to replace the attributes values that contain <= with the value references below and then create the XML file parse it
Character
Entity References
& &
< <
> >
“ "
‘ '
October 22, 2009 at 3:50 am
Cool! Glad you figured it out. @=)
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy