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 » xml whitespace

Post new topic  Reply to topic
 xml whitespace « View previous topic :: View next topic » 
Author Message
aks
PostPosted: Mon Aug 26, 2002 10:55 pm    Post subject: xml whitespace Reply with quote

Voyager

Joined: 19 Jul 2002
Posts: 84

I'm using dynamic references (with NEXTSIBLING etc) to move through repeatable XML elements, because I was told that it was more efficient then first counting the number of elements with a CARDINALITY statement then looping through.

However, my input xml that contains whitespace between the elements breaks the flow. For example, if my xml looks like:

<A>
<B>blah 1</B>
<B>blah 2</B>
<B>blah 3</B>
</A>

then using NEXTSIBLING doesn't work (in fact it counts through 6 times, instead of 3, according to the trace). But if I strip all the whitespace around the elements, then it works fine.

How can I do a check to see of there is whitespace, and then ignore it?

Thanks
Alan
Back to top
View user's profile Send private message
lillo
PostPosted: Tue Aug 27, 2002 4:07 am    Post subject: Reply with quote

Master

Joined: 11 Sep 2001
Posts: 224

Hi,

Try the following when you move to the nextsibling element:

MOVE NEXTSIBLING TYPE '0x1000000'

I hope this help you.

Cheers,
_________________
Lillo
IBM Certified Specialist - WebSphere MQ
Back to top
View user's profile Send private message
aks
PostPosted: Tue Aug 27, 2002 2:27 pm    Post subject: Reply with quote

Voyager

Joined: 19 Jul 2002
Posts: 84

Thanks - it works

I have also found another way as well:

MOVE ref NEXTSIBLING REPEAT TYPE NAME;
which ensures that the next sibling will be a <B> element.

Alan
Back to top
View user's profile Send private message
MQSIBM
PostPosted: Tue Aug 27, 2002 6:37 pm    Post subject: Reply with quote

Novice

Joined: 31 Oct 2001
Posts: 18

hi aks
i am working on WMQI 2.1.
i am using NEXTSIBLING in my esql, and its giving me syntax error.

do you have any idea about this ?


// my esql :
DECLARE myref REFERENCE TO InputBody.ExInvoice.Items[1];
WHILE LASTMOVE(myref)=TRUE
DO
SET myref = myref + 1;
MOVE myref TO NEXTSIBLING;
END WHILE;
-------------
I wantedly did deployment even though having sytax error problem,here is error -
BIP2432E: (92, 1 : The correlation name 'NEXTSIBLING' is not valid
Back to top
View user's profile Send private message
aks
PostPosted: Tue Aug 27, 2002 7:06 pm    Post subject: Reply with quote

Voyager

Joined: 19 Jul 2002
Posts: 84

Although the documentation in 2.1 says to use

MOVE myref TO NEXTSIBLING;

it will give a syntax error. Remove the 'TO' from the statement and it will work.

Alan
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Aug 27, 2002 7:22 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

The syntax of MOVE statement is different in CSD1 and CSD2 of WMQI. I think, TO is allowed in CSD1, but not in CSD2.
_________________
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 » xml whitespace
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.