It took me a while to figure out where they came from, but finally I found this: I had an input string containing the XML like this:
<root><node></node></root>
In BizTalk inside an expression shape, I had code like this:
xdoc.LoadXml(myInputString); someMessage = xdoc;
Here someMessage contained:
<root> <node> <node> </root>
So <node> contained a line-break...
The solution was simple: set PreserveWhitespace to true like this:
xdoc.LoadXml(myInputString); xdoc.PreserveWhitespace = true; someMessage = xdoc;
Thanks to Scott Colestock's blog I found this.
BTW When the input XML was like this:
<root><node /></root>the problem never occured...
No comments:
Post a Comment