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
 Other Forums
 Other Topics
 XML Parsing Error(Urgent)

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-06-28 : 10:40:05
Manish writes "Follwing is my XML String which i pass to stored procedure to Select & update to database
<project projectno = "2">
<generalcondition>
<tgc_no>0</tgc_no>
<tgc_generalconditionno>1</tgc_generalconditionno>
<unitcode></unitcode> <tgc_unitprice>100</tgc_unitprice>
<tgc_quantity>100</tgc_quantity> <tgc_amount>1000</tgc_amount>
<tgc_desc>New Description & Cond</tgc_desc>
<tgc_comments>Comments</tgc_comments>
</generalcondition>
</project>

i get error as
XML parsing error: Whitespace is not allowed at this location.

But if i remove & sign from tgc_desc attributes it works fine

Thanks"

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2005-06-28 : 11:11:30
The ampersand character in XML starts a character reference or entity reference. To include an ampersand in a piece of text or an attribute value you need to escape it. Use &amp; that's the five characters:
&
a
m
p
;
Go to Top of Page
   

- Advertisement -