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 » Element Index

Post new topic  Reply to topic
 Element Index « View previous topic :: View next topic » 
Author Message
ins0mniac2
PostPosted: Wed Jan 04, 2012 9:55 am    Post subject: Element Index Reply with quote

Apprentice

Joined: 25 Jul 2005
Posts: 33

I am on version 6.1 of WMB.

Is there a function that can return you the index of a repeating XML field?

Example

<A>
<B>123</B>
<B>abc</B>
<B>567</B>
<B>837</B>
</A>

I want to be able to know the index value of element <B>567</B> which in this case is 3.

I know that I can create my own loop and iterate and increment my own index, but I was wondering if there was a function, similar like POSITION works for string, this would return the index of a tree element.
Back to top
View user's profile Send private message AIM Address
Vitor
PostPosted: Wed Jan 04, 2012 10:01 am    Post subject: Re: Element Index Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ins0mniac2 wrote:
Is there a function that can return you the index of a repeating XML field?


No.

Why do you need to know this? What benefit is the index position of the element to your requirement? Given that having found the element in the tree, you can always go back to it without knowing the index value.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jan 04, 2012 10:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You should always code using references, and never code using indexes.
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 » Element Index
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.