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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 XML Output to Local Drive

Author  Topic 

sahu_mantu
Starting Member

1 Post

Posted - 2013-09-05 : 14:04:19
Hi All,

We have created a stored procedure in sql server 2008 which returns the output results in XML. I need to store this XML in my local drive.

I have tried using SSIS but it gives me an error "Error in rool level element" Even though i have proper parent element.

Please let me know how can i achieve this requirement.

Thanks,
Mantu

Cooper-5
Starting Member

10 Posts

Posted - 2013-09-09 : 09:48:41
Hi Sahu,

Could you provide an example of the xml you are attempting to write to a file?


*# Nothing is truly idiot proof, because the world keeps producing a higher class of idiot #*
Go to Top of Page

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-09-09 : 10:23:10
Couple of additional thoughts:

1. SQL XML accepts even XML fragments; i.e., there does not need to be a root element for SQL to process it. Since you have indicated that you have "proper parent element", I am assuming that you have a root element.

2. Simplify your problem to a very simple XML document, perhaps with a root node and one element under it and see if you can process that through SSIS successfully.

3. If neither of the above helps, as Cooper suggested, post a representative sample of your XML.
Go to Top of Page
   

- Advertisement -