This article has been archived. It is offered "as is" and will no longer be updated.
When you invoke the sp_xml_preparedocument stored procedure, the call fails with this error message:
Server: Msg 6603, Level 16, State 1, Procedure sp_xml_preparedocument, Line 19XML parsing error: A string literal was expected, but no opening quote character was found.
The sp_xml_preparedocument stored procedure was given an invalid XML document to process.
Correct the XML document passed into the sp_xml_preparedocument stored procedure for processing.
The behavior is by design.
Users have requested that the program have the ability to provide the location within the XML document in which the error is located. Currently, this functionality does not exist. However, here is way you can determine where the error is occurring in your XML document:
Save the XML document in a text file with an extension of .xml.
Load that .xml document into Microsoft Internet Explorer 4.01 by browsing to the .xml file.
Steps to Reproduce Behavior
Paste the following code into the SQL Server Query Analyzer, and then run the code: