Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hai,

(i) I'm using the SP_XML_PREPAREDOCUMENT to get values which I sent as xml string. But some of the text are missing by using this.
The error I'm getting is "XML parsing error: A name contained an invalid character.".

(ii) What is the maximum size to convert the xmlstring using the SP_XML_PREPAREDOCUMENT. I'm using sql server 2000.

Thanks in advance,

Riswan
Posted
Comments
RedDk 9-Jan-13 18:52pm    
That exact error was a surprise to me also ... and I'm usg sql2k8exp. But I fixed the return by bumping up a [nvarchar](MAX) which was the type of the variable I was usg to hold the SELECT return. So convert or cast, maybe?

1 solution

Sometimes this error came when we have some special character in XML sting like "_x0020_" or handle null values or specify a valid encoding for Cyrillic alphabets before use it by SP_XML_PREPAREDOCUMENT
 
Share this answer
 
Comments
Mohamed Riswan MCA 31-Oct-12 6:29am    
Do you have any memory related info. while accessing the xml string. Because I'm sending bulk data. I split the data and read it works fine, but failed to read the accumulated data.

Your updation is very valid.

Thanks in advance,
Riswan
SoumenBanerjee 31-Oct-12 7:06am    
No I don't have any memory related info, The most common cause is encoding errors and escaping problematic characters ("<" becomes "<", "&" becomes "&", etc.)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900