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.
| Author |
Topic |
|
manish_joisar
Starting Member
1 Post |
Posted - 2005-06-27 : 03:17:50
|
Following is the XML that i pass to SP When i Call Sp_Xml_PrepareDocument it give error asXML parsing error: Whitespace is not allowed at this location.But when i remove '&' from (MOVE IN & OUT) and put there 'and'it is working fineSo what to do '<project projectno="1"><generalcondtion tgc_no="11" tgc_generalcondtionno="8" unitcode="" tgc_unitprice="4100" tgc_quantity="1" tgc_amount="4100" tgc_desc="GENERAL LIABILITY INSURANCE" tgc_comments="" /><generalcondtion tgc_no="1" tgc_generalcondtionno="10" unitcode="" tgc_unitprice="45" tgc_quantity="80" tgc_amount="3600" tgc_desc="MOVE IN & OUT" tgc_comments="" /></project>' |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2005-07-05 : 18:12:53
|
HiThe ampersand character has special meaning in XML. If you want to use it literally, you must 'escape' it by using the entity reference '&'.You can use the REPLACE function to do this as follows:SET @MyXML = REPLACE(@MyXML, '&', '&') Just a minor point, but that typo in what I'm assuming should be your <generalcondition> entity will probably be a pain later on if left unchecked!Mark |
 |
|
|
|
|
|