|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Converting the XML to string (&lt etc) |
« View previous topic :: View next topic » |
Author |
Message
|
eaiwmb |
Posted: Mon Sep 15, 2008 8:00 am Post subject: Converting the XML to string (&lt etc) |
|
|
Newbie
Joined: 15 Sep 2008 Posts: 1
|
Hi,
I want to convert the input xml data with escape sequence before sending it to output.
Input Payload
<Emp>
<Name>Mike</Name>
<Add>NY</Add>
</Emp>
output XML needed.
<XML>
<Employee Detail><Emp><Name>.......</Employee Detail>
thanks for help |
|
Back to top |
|
 |
paranoid221 |
Posted: Mon Sep 15, 2008 9:44 am Post subject: |
|
|
 Centurion
Joined: 03 Apr 2006 Posts: 101 Location: USA
|
I believe if you cast the input payload as character data before you attach it to the output payload, you should be able to get what you want.
....
...
...
Oh and for Christ's sake stop using the XML domain
 _________________ LIFE is a series of complex calculations, somewhere multiplied by ZERO. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Sep 15, 2008 10:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Oh and for Christ's sake stop using the XML domain |
Wow! I thought I was on a hair trigger when it came to that issue There's not even any absolute proof that eaiwmb is actually using the XML domain. Maybe his output message has a root tag <xml>
Quote: |
I want to convert the input xml data with escape sequence before sending it to output |
Are you sure you need to? Any message broker XML parser will automatically escape all XML markup characters in the value of an element/attribute. So the obvious solution is to
- ASBITSTREAM the input tree ( using the appropriate CCSID/encoding ) obtaining a BLOB
- CAST the BLOB to CHARACTER
- assign the CHARACTER result to the element in the output tree
If I was doing it, I would use a CDATA section because it makes the output much tidier. Now you're going to tell me why you can't do that
And if you're not already, use XMLNSC. Assuming that you're on v6.0 or v6.1. |
|
Back to top |
|
 |
paranoid221 |
Posted: Wed Sep 17, 2008 10:24 pm Post subject: |
|
|
 Centurion
Joined: 03 Apr 2006 Posts: 101 Location: USA
|
Quote: |
@ Kimbert: Maybe his output message has a root tag <xml> |
OK...Okk...Fine .... I rushed myself while reading through it.  _________________ LIFE is a series of complex calculations, somewhere multiplied by ZERO. |
|
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
|
|
|
|