ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » getting a xml attribute value

Post new topic  Reply to topic
 getting a xml attribute value « View previous topic :: View next topic » 
Author Message
RocknRambo
PostPosted: Thu Jul 22, 2004 7:11 am    Post subject: getting a xml attribute value Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Jul 22, 2004 7:21 am    Post subject: Reply with quote

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
View user's profile Send private message
RocknRambo
PostPosted: Thu Jul 22, 2004 7:54 am    Post subject: Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Thu Jul 22, 2004 9:07 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » getting a xml attribute value
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.