SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Valid XML question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

elwoos
Flowing Fount of Yak Knowledge

United Kingdom
2039 Posts

Posted - 07/02/2012 :  06:48:14  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

United Kingdom
2039 Posts

Posted - 07/02/2012 :  08:33:33  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
1608 Posts

Posted - 07/02/2012 :  12:29:15  Show Profile  Click to see yosiasz's MSN Messenger address  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000