|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Repeting Elements |
« View previous topic :: View next topic » |
Author |
Message
|
prabhu1950 |
Posted: Fri Jul 16, 2004 6:38 am Post subject: Repeting Elements |
|
|
Novice
Joined: 27 May 2004 Posts: 10
|
Hi,
I have a difficulty in dealing with the repeating elements. I am trying to send the Person height details to the ouput message elements.
the output message shoule be like this,
<Subject>
<PersonHeightMeasure PersonHeightUnitCode = "ft">5</PersonHeightMeasure>
<PersonHeightMeasure PersonHeightUnitCode = "in">11</PersonHeightMeasure>
</Subject>
But my result shows only 'in' value i.e 11.
The ESQL Code looks like this
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure.PersonHeightUnitCode = 'ft';
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure = TRIM(OutputRoot.XML.Data.Results[J].XXX_HT_FEET);
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure.PersonHeightUnitCode = 'in';
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure = TRIM(OutputRoot.XML.Data.Results[J].XXX_HT_INCHES);
Can anybody please help me in this regard.
Many Thanks,
Sri |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jul 16, 2004 7:14 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you want to set an XML Attribute, you need to indicate that the field type you are setting is XML Attribute.
Code: |
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure.(XML.Attribute)PersonHeightUnitCode = 'ft'; |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JT |
Posted: Fri Jul 16, 2004 7:20 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Code: |
DECLARE K INTEGER 1;
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure[K].(XML.Attribute)PersonHeightUnitCode = 'ft';
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure[K] = TRIM(OutputRoot.XML.Data.Results[J].XXX_HT_FEET);
SET K = K + 1;
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure[K].(XML.Attribute)PersonHeightUnitCode = 'in';
SET OutputRoot.MRM.Subject[J].PersonHeightMeasure[K] = TRIM(OutputRoot.XML.Data.Results[J].XXX_HT_INCHES); |
|
|
Back to top |
|
 |
prabhu1950 |
Posted: Fri Jul 16, 2004 7:34 am Post subject: It Worked |
|
|
Novice
Joined: 27 May 2004 Posts: 10
|
Hi JT,
Great! It Worked.
Thanks a lot.
Sri |
|
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
|
|
|
|