Author |
Message
|
LH33 |
Posted: Fri Apr 11, 2003 5:30 am Post subject: Missing tag in OutputRoot |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
HI! I have a message flow that takes an XML transaction that has the second of an indexed tag populated. The index 1 of that tag is not passed in the input XML. When the flow is finished, the second tag does not have the data that was in the InputRoot. Can someone help me see what I am doing wrong? Here is my code: I also have a portion of the input XML following the code:
SET OutputRoot.XML.CreateJob.DataArea.Job.Filters.Filter[1] =
'ODL';
SET OutputRoot.XML.CreateJob.DataArea.Job.Filters.Filter[1].
(XML.Attribute)index=1;
SET OutputRoot.XML.CreateJob.DataArea.Job.Filters.Filter[2] =
InputRoot.XML.CreateJob.DataArea.Job.Filters.Filter[2];
SET OutputRoot.XML.CreateJob.DataArea.Job.Filters.Filter[2].
(XML.Attribute)index=2;
Here is what is sent to me:
<Filters><Filter index="2">COCKEYSVIL</Filter></Filters>
Last edited by LH33 on Fri Apr 11, 2003 8:42 am; edited 1 time in total |
|
Back to top |
|
 |
yaakovd |
Posted: Fri Apr 11, 2003 8:38 am Post subject: |
|
|
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
|
Lisa,
I think you need
Code: |
SET OutputRoot.XML.CreateJob.DataArea.Job.Filters.Filter[2] =
InputRoot.XML.CreateJob.DataArea.Job.Filters.Filter[1]; |
_________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel |
|
Back to top |
|
 |
LH33 |
Posted: Fri Apr 11, 2003 8:47 am Post subject: |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
HI! I don't want to set it to Filter[1] because I have to keep what is sent to me in Filter[2] and then populate filter[1] with a value of 'ODL'. The XML that is passed to me is:
<Filters><Filter index="2">COCKEYSVIL</Filter></Filters>
The filter[1] tag is not passed.
What I want the output to look like is:
<Filters>
<Filter index="1">ODL</Filter>
<Filter index="2">COCKEYSVIL</Filter>
</Filters>
Thanks for any help you can provide! |
|
Back to top |
|
 |
yaakovd |
Posted: Fri Apr 11, 2003 8:56 am Post subject: |
|
|
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
|
Lisa,
My understanding that you create empty tag for Filter[2]?
But in input message it is still the first tag.
So
SET OutputRoot.XML.CreateJob.DataArea.Job.Filters.Filter[2] =
InputRoot.XML.CreateJob.DataArea.Job.Filters.Filter[1];
should work.
Also you can use function FORANY and where index = 2. _________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel |
|
Back to top |
|
 |
LH33 |
Posted: Fri Apr 11, 2003 9:12 am Post subject: |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
Thanks!! That works great now!! |
|
Back to top |
|
 |
|