|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
getting a xml attribute value |
« View previous topic :: View next topic » |
Author |
Message
|
RocknRambo |
Posted: Thu Jul 22, 2004 7:11 am Post subject: getting a xml attribute value |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
hello everybody!!...
I am trying get a value of an xml attribute from the input message. the pblm I'm getting is....
when the value is > 0...its doing the job what I want. but when the value is equal to 0 ....then I see the output is coming as 1.
I dont know this looks strange for me. is any other precaution step to be taken to retrieve a value of an xml attribute.
can anybody suggest me.
thanks in advance.
-sanu |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 22, 2004 7:21 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Please show your code. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RocknRambo |
Posted: Thu Jul 22, 2004 7:54 am Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
hello Jeff..
the way I am trying is.....
DECLARE get_lnValue CHAR;
SET get_lnValue =
CAST(InputRoot.XML.Orders.Books.Quantity.(XML.attr)Qty AS CHAR);
so, here when the Qty > 0, I'm getting the value is correct but when it is equal to 0..I'm getting as 1. |
|
Back to top |
|
 |
kirani |
Posted: Thu Jul 22, 2004 9:07 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
All elements are shown as Strings in XML format, so you don't need to use CAST function.
Try this,
Code: |
SET get_lnValue = InputRoot.XML.Orders.Books.Quantity.(XML.Attribute)Qty;
|
What version of WMQI/WBIMB are you using? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
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
|
|
|
|