Auto Generating Multiple XML Files Using SSIS

  • Comments posted to this topic are about the item Auto Generating Multiple XML Files Using SSIS

  • Thank you for this nice piece C.J.


  • Thank you for your post.

    We do a lot of XML exports with SSIS. And it works great.

    Is it possible to get a formated xml output (readable for humans with linebreaks). Getting the whole XML in one line is for humans unreadable.

    Does anyone know a trick to get this formatting done?

    Greetings Reto

  • Hi, Thanks for the feedback. As far as making the XML readable, I am thinking you would have to first shred the XML and then you can export it out into a more readable format.

    SELECT CatalogDescription.value('

    declare namespace PD="";

    (/PD:ProductDescription/@ProductModelID)[1]', 'int') AS Result

    ,CatalogDescription.value (

    'declare namespace PD="";

    declare namespace html="";

    (/PD:ProductDescription/PD:Summary/html:p)[1]','nvarchar(1000)') as SummaryResult

    FROM Production.ProductModel

    WHERE CatalogDescription IS NOT NULL

    ORDER BY Result desc

  • Shredding is a good idea if you work with XML in your database. But here we export a XML from tables of our database to the filesystem. And I like to check the generated XML files by opening them.

    My workaround is to open the XML file with Internet Explorer. IE formats the XML so it is much better readable. But I would prefer to be able to open the xml file with a text editor. But with a single line of all the xml data, it's unreadable in a normal text editor.

    I thought, maybe someone knows a trick to accomplish this.

Viewing 5 posts - 1 through 4 (of 4 total)

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