|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Messageset with no <cr><lf> |
« View previous topic :: View next topic » |
Author |
Message
|
matuwe |
Posted: Wed Jan 20, 2010 12:51 am Post subject: Messageset with no <cr><lf> |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
I have a TDS message set with some XML files. The messageset works fine except I do not get a currage ruturn after ever xml tag. I tried setting the Physical properties of my type the delimeter is set to <CR><LF> but still no luck.
My results look like this <Details><user><name>hello</name></user></Details> all on one line..
Please help what am I missing? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 20, 2010 4:27 am Post subject: Re: Messageset with no <cr><lf> |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
matuwe wrote: |
Please help what am I missing? |
What I'm missing is what you're trying to achieve. While many products display XML with one tag to a line, and manually generated XML typically does for readability, you'll find a lot of generated XML doesn't have this whitespace & indeed the XMLNSC parser strips it out when it reads it in.
So why are you trying to insert these padding characters? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
matuwe |
Posted: Wed Jan 20, 2010 4:50 am Post subject: |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
Hi,
My flow is returning an xml file which loses carriage return characters. The XML is fine, but the destination application seems to require the carriage return. Is there anyway that I can force my messageset to put carriage return after every element.
I also had a look at this URL http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/au16550_.htm which also says it shouldn't matter that the carriage return exist. But now this application that I am sending the data too is failing.
I have even checked the results and can be parsed successfully using broker??  |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jan 20, 2010 5:26 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
the destination application seems to require the carriage return |
I agree with Vitor. The destination application is broken because it claims to accept XML, but cannot parse the valid XML which your message flow is generating.
You can put line breaks into your output XML - you need to treat them as 'mixed content'. You can insert the required mixed content into your output message as follows:
- Walk through OutputRoot.XMLNSC from the top
- In each place where you want a line break, add an extra element with field type XMLNSC.PCDataValue and a CHARACTER value containing a line break.
The extra fields will of type 'Value', so you don't need to assign a name.
The code ( not tested, not even compiled ) will be something like this:
Code: |
CREATE FIRSTCHILD OF myREF TYPE XMLNSC.PCDataValue VALUE "
"; |
where myRef is the reference that you use to iterate over OutputRoot. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|