XML comment in BizTalk output message
December 11th, 2006We ran into an issue today when we had to have an XML comment just below the XML declaration in a message we’re producing in our BizTalk 2006 solution. We needed to produce something like the below.
<?xml version="1.0"?> <!-- Comment goes here -->
Our first approach was to create a map in the send port and to have a custom XSLT template in there that added the comment before the whole transformation process started. We actually got this to work but it meant that we had to have a whole new map with a separate XSLT document in the project!
Eventually we found a property called Xml Asm Processing Instructions (highlighted in the figure – click it to view it in original size) on the XML assembly component (used in the standard XMLTransmit pipeline).
We just put the comment as a value in this property and we were done! No new artifacts or code! Just a weird property – typical BizTalk behavior!
June 21st, 2007 at 6:50 pm
Hello! Good Site! Thanks you! nrhrobjnmztcih