Author |
Message
|
phanisasi |
Posted: Wed Sep 14, 2011 2:05 am Post subject: wmb basics |
|
|
Newbie
Joined: 13 Sep 2011 Posts: 8
|
hi...iam new to wmb...
if we give the following xml as mq input node
<names>
<name>phani kumar </name>
<name>sasi kanth</name>
<name>ravi kumar</name>
</names>
output xml will be
<output>
<firstname>phani</first name>
<lastname>kumar</lastname>
<firstname>sasi</first name>
<lastname>kanth</lastname>
<firstname>ravi</first name>
<lastname>kumar</lastname>
how can we write a code in computenode>>>>>>>>plz reply me
</output> |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 14, 2011 4:03 am Post subject: Re: wmb basics |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
phanisasi wrote: |
how can we write a code in computenode |
There's a difference between being new to WMB and getting stuck on a tricky point, and this "so how do I use the product" question.
If you don't know something this simple, you shouldn't be using WMB and more importantly shouldn't have been given this task without mentoring or training (which someone will be along to recommend shortly).
I can think of half a dozen ways of performing this task, which is so simplistic I'm thinking interview question.......  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
phanisasi |
Posted: Thu Sep 15, 2011 4:20 am Post subject: |
|
|
Newbie
Joined: 13 Sep 2011 Posts: 8
|
got it..but is it good way
DECLARE COUNT INTEGER 1;
WHILE COUNT<4 DO
CREATE LASTCHILD OF OutputRoot.XMLNSC.output.NAMES.NAME[COUNT] NAME 'FIRSTNAME1'
VALUE SUBSTRING(InputRoot.XMLNSC.NAMES.NAME[COUNT] BEFORE '.');
CREATE LASTCHILD OF OutputRoot.XMLNSC.output.NAMES.NAME[COUNT] NAME 'LASTNAME1'
VALUE SUBSTRING(InputRoot.XMLNSC.NAMES.NAME[COUNT] AFTER '.');
SET COUNT =COUNT+1;
END WHILE; |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 15, 2011 7:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
phanisasi wrote: |
got it..but is it good way |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
phanisasi |
Posted: Fri Sep 16, 2011 12:45 am Post subject: |
|
|
Newbie
Joined: 13 Sep 2011 Posts: 8
|
|
Back to top |
|
 |
exerk |
Posted: Fri Sep 16, 2011 2:22 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
phanisasi wrote: |
 |
For someone new to Message Broker you are very brave to lock horns with someone whom has a vastly greater knowledge, understanding, and wealth of experience. Or you are a troll, or something else... _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
|