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 » How to access fields with attributes

Post new topic  Reply to topic
 How to access fields with attributes « View previous topic :: View next topic » 
Author Message
brgmo
PostPosted: Wed Oct 31, 2007 6:34 am    Post subject: How to access fields with attributes Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Hi All,

I have a repaeting field with the name Quantity but with different attributes:

<Qunatity qualifier="ITEM">
<value>24</value>
</Quantity>
<Qunatity qualifier="ITEM1">
<value>108</value>
</Quantity>

How can i code the esql to get the values if requested attribute is ITEM or ITEM1.

Regards
brgmo.
Back to top
View user's profile Send private message
brgmo
PostPosted: Wed Oct 31, 2007 7:42 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

any help on this please.

Regards
brgmo.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 31, 2007 7:43 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This is what the SELECT statement is for.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
brgmo
PostPosted: Wed Oct 31, 2007 7:50 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

can you please give me the code for this.i am not able to write this one.

Regards
brgmo.
Back to top
View user's profile Send private message
vsr
PostPosted: Wed Oct 31, 2007 9:10 am    Post subject: Reply with quote

Centurion

Joined: 04 Apr 2006
Posts: 104

jefflowrey wrote:
This is what the SELECT statement is for.


You can get the Attribute(qualifier) value by 'InputRoot.XXX.Qualifier.(XML.Attribute)qualifier'

Based on the qualifier you can implement your logic.

For example if you need to output for all <Quantity> fields with same attribute (qualifier) you can code like this :

SET OutputRoot.XMLNS.Data.Output[] =
(SELECT R.Quantity.* AS Quantity.(XML.Attribute)Quantity,
R.Value AS Quantity.Value
FROM InputRoot.XMLNS.*****.Quantity AS R
WHERE R.(XML.Attribute) = 'ITEM1'
);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to access fields with attributes
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.