4
Answers

XML Parser Error when using web services

Photo of srinath

srinath

14y
3.1k
1
Hi,

I am facing a problem when I am retreiving a data from data field of type 'nvarchar' which has unicode data from sql server 2008 and converting the data to xml format using web service in asp.net 3.5 with c#.

I am getting an error as "XML Parsing Error: reference to invalid character number".

I tried in google but i couldn't solve my problem.

Please, Help me...

Answers (4)

0
Photo of Amit Choudhary
NA 27.7k 3m 14y
Hi Sam,
I guess the stack trace or the Exception SnapShot(Doesn't mean its time stamp based :)) AKA Screenshot. Let see if it could be helpful after looking at the exception details.
0
Photo of Sam Hobbs
NA 28.7k 1.3m 14y

srinath: it will really help if you were to provide the data causing the error; try to not provide too much of course. Specifically, what character number is causing the error? Also the code at the point that the error occurs will help.
 
Amit: what do you mean by "snap of error"? Do you mean the exact time that the error occured (snapped)? If so, then are you sure that the Stack Trace shows that?
0
Photo of Suthish Nair
NA 31.7k 4.6m 14y
use XML PATH, sql server 2008.
0
Photo of Amit Choudhary
NA 27.7k 3m 14y
Can you provide little more details on error.. like exact snap of error with Stack Trace. or the data from the nvarchar field. cause there may be some error in the data like having special character for e.g., <,> etc.