0

I have the following string that I want to convert to a presentable XML format. Presentable meaning, properly indented and carriage returned at appropriate spots. For some reason, I cant seem to get this to work.

<HTML><SSISLog><PackageProperty><PackageName>Package</PackageName><PackageID>{67D67690-D437-42DB-80A2-A7FB68353E70}</PackageID></PackageProperty></SSISLog></HTML>'

Can I use the xml task to do this job? Any inbuilt stored procedures for the same?

rvphx
  • 2,324
  • 6
  • 40
  • 69

1 Answers1

2

No, the XML task will not beautify the XML. Add a script task and use the method that was provided on this answer What is the simplest way to get indented XML with line breaks from XmlDocument?

And in case you aren't sure how to make the string into an xmldoc, this answer should show the way Format XML String to Print Friendly XML String

Community
  • 1
  • 1
billinkc
  • 59,250
  • 9
  • 102
  • 159
  • I had patch the script on the link in a script task. I did that after a few small changes and it works fine. Thanks for the solution. – rvphx Jul 20 '12 at 15:25