xml help

  • I don't know whether it's the best way to do it or not, but i am using sp_makewebtask to export a for XML Path query to file for users. The stored procedure i made works fine, but when there are several records in the export, the XML file that is being created has a double line break every 2033 characters. This causes the file to not display correctly, but when i remove the line breaks (manually), it works fine.

    My question is..

    Does anyone know a way around this?

    OR

    Does anyone have a better way to generate an XML file via stored procedure (so i can have users doing it).

    any help appreciated! Thanks!

  • ok nevermind my first question; i know why it is doing it. According to Microsoft, there is no workaround unless i want to write a custom application using a different data retrieval method.

    So my new question is...

    Does anyone here export from SQL directly to an XML file using FOR XML Path (I have a lot of nested queries building the XML statement so it can't come directly from a table using the format option in BCP).

    If so, what command are you using to do it that it does not export larger results in 4K sets, resulting in an unreadable XML file?

    Any help would be appreciated -- pulling my hair out here!! :unsure:

  • did you find any solution to this as i am struggeling with the same problem!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply