After a lot of trial and error I almost got it. I am passing an xml string to a stored procedure from ASP. Everything almost works exept when it passes the sting into the stored proc it looks invalid. I captured the action in SQL Profiler and here is how is processing the xml string.<br /><br />(From Profiler SQL<img src='/community/emoticons/emotion-7.gif' alt=':S' />tmtStarting)<br />exec usp_InsertFromXml '<ROOT><ROWps_id="1"psid_id="1"tipPrd_id="1"/><ROWps_id="1"psid_id="1"tipPrd_id="1"/></ROOT>'<br /><br />For some reason it is not puting spaces inbetwean the string I copied and ran these two statements from QA<br /><br />exec usp_InsertFromXml '<ROOT><ROWps_id="1"psid_id="1"tipPrd_id="1"/><ROWps_id="1"psid_id="1"tipPrd_id="1"/></ROOT>'<br /><br />exec usp_InsertFromXml '<ROOT><ROW ps_id="1" psid_id="1" tipPrd_id="1"/><ROW ps_id="1" psid_id="1" tipPrd_id="1"/></ROOT>'<br /><br />The second one I put spaces inbetween everything and it worked fine, but the first one gave me a parsing error. for some reason when it is getting passed from ASP it is sending it invalid.
Incase anyone interested some very helpful person (Gabriel) gave me a solution. in Jscript I was sending the XML like this var sSend = "xmldoc=" + document.all("xmldoc").documentElement.xml; He told me to add the escape function and it worked. Example.... var sSend = "xmldoc=" + escape(document.all("xmldoc").documentElement.xml); I know this is a SQL Forum and not an ASP Forum, but thought it was worth mentioning the solution.