Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Valid XML question

Author  Topic 

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2012-07-02 : 06:48:14
I have a varchar field that contains SOAP requests i.e. XML. I'm trying to query the field by casting it as XML but occasionally the cast fails claiming that the XML is invalid.

I've tracked this down to an element that contains free text, in particular it contains the UK Pound symbol £. which is going to appear in the field as there will sometimes be payment information in it. I thought this was a valid character.

Does anyone know what's going on here or how I might work around it? I'm sort of guessing that even if I create an xml field to contain this content I am still going to have the same issue.

thanks

steve

-----------

Insanity: doing the same thing over and over again and expecting different results.

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2012-07-02 : 08:33:33
It seems this is connected to the xml encoding as described in http://fyneworks.blogspot.co.uk/2007/04/ajaxxml-problem-with-british-pound-sign.html though I am not sure the solutions posted there will help me

-----------

Insanity: doing the same thing over and over again and expecting different results.
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2012-07-02 : 12:29:15
is there any encoding associated with this xml? could you post a sample of the problematic xml

<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page
   

- Advertisement -