Posted: Thu Sep 27, 2007 3:30 pm Post subject: Using MBFE to go from XML Message to XML File
Newbie
Joined: 27 Sep 2007 Posts: 3
Hi, i am using WMB 6 with MBFE.
I have created an XML message using a message set and have placed this message on a queue.
I have created the following flow:
MQInput > FileProxyNode > ComputeNode > FileOutputNode
I am able to succesfully write the XML message to a .txt file. However the format of the XML in the text file is:
<Record><CostCenter>CostCenter</CostCenter><CurrencyCode>CurrencyCode</CurrencyCode></Record>
(The whole XML message on the one line)
How do i specify that the XML should be formated correctly in the text file??
EG:
<Record>
<CostCenter>CostCenter</CostCenter>
<CurrencyCode>CurrencyCode</CurrencyCode>
</Record>
My Compute node has the following ESQL snippet:
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.MQMD = InputRoot.MQMD;
SET OutputRoot.Properties.MessageFormat = 'XML';
SET OutputRoot.XMLNS.Record = InputRoot.XMLNS.(XML.Element).Extract.Record;
Whitespace characters outside of tags are explicitly ignored by all XML parsers.
XML is also not intended to be read by people. It's a format that's designed to be relatively easy for machines to read.
All that said, the XMLNS parser will preserve and reproduce whitespace elements in the message tree, including elements that contains platform specific line ending characters. _________________ I am *not* the model of the modern major general.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum