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 |
|
fmardani
Constraint Violating Yak Guru
433 Posts |
Posted - 2007-02-23 : 09:33:01
|
| Hello,I am trying to use OPENXML to read the data inside the xml file.Initially I parse the xml using the xmlDocument.OuterXmlto retrieve the xml as string. This string is then passed to the sql query which uses openxml.The error I am getting is:Server: Msg 6603, Level 16, State 1, Procedure sp_xml_preparedocument, Line 14XML parsing error: A string literal was expected, but no opening quote character was found.After investigations and some tests on OPENXML query, I now know the error is to do with the xml string itself. For example if I copy and paste the xmlstring into a text file and save it as .xml, I get the same error if I double click on the file to open it in Internet Explorer.So how else can I get the correct version of the xmlstring to pass to the openxml query please?I notice that after retrieving the xml as string, instead of <forwardCurve code="AL LME_FUT"> the string shows <forwardCurve code=\"AL LME_FUT\">This seems to be the error.Thanks |
|
|
|
|
|