August 25, 2014 at 12:05 am
Comments posted to this topic are about the item Auto Generating Multiple XML Files Using SSIS
August 25, 2014 at 6:45 am
Thank you for this nice piece C.J.
😎
August 27, 2014 at 7:15 am
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
August 28, 2014 at 8:27 am
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="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription";
(/PD:ProductDescription/@ProductModelID)[1]', 'int') AS Result
,CatalogDescription.value (
'declare namespace PD="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription";
declare namespace html="http://www.w3.org/1999/xhtml";
(/PD:ProductDescription/PD:Summary/html:p)[1]','nvarchar(1000)') as SummaryResult
FROM Production.ProductModel
WHERE CatalogDescription IS NOT NULL
ORDER BY Result desc
August 28, 2014 at 11:25 pm
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