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 » Locating a tag occurrance within a XML message

Post new topic  Reply to topic
 Locating a tag occurrance within a XML message « View previous topic :: View next topic » 
Author Message
schroederms
PostPosted: Wed Mar 05, 2008 3:11 pm    Post subject: Locating a tag occurrance within a XML message Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

I'm trying to find a tag occurance within a huge XML messages, so I can append some data to a tag within the tag I'm searching for.

This ESQL statement brings back obviously the value of t.out, what I'm really wanting is the occurance of the item[] tag, so I can then loop thru and modify this tag value. The reason I do this is because the value of the tag is a bunch of pipe delimted data.


Set Environment.FindTheRow[] =
(Select t.out From InputBody.RESPONSE.APP.RESULT."Z_RFC_GET_TERRITORY_PRVDRS.Response".MATMAN_STRING_OUT.item[] as t
where t.OUT like
'2008|1100|10|1I|11IB|IBE|050|91M51|SP|N212|91M51-N212|0008800205|ABC%');

Any suggestions?

Here is a small sample of the data I'm searching.
<?xml version="1.0" encoding="ISO-8859-1"?>
<RESPONSE>
<Z_RFC_GET_TERRITORY_PRVDRS.Response>
<END_TIME>11:03:15</END_TIME>
<START_TIME>11:03:15</START_TIME>
<SYSUBRC>0</SYSUBRC>
<MATMAN_STRING_OUT>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N201|91M51-N201|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 1|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N202|91M51-N202|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 50|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N203|91M51-N203|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 50|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N211|91M51-N211|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 1|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N212|91M51-N212|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 50|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N213|91M51-N213|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 50|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N221|91M51-N221|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 1|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N222|91M51-N222|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 50|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N231|91M51-N231|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 1|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N232|91M51-N232|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 50|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N233|91M51-N233|0001119284|WW Supply| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 50|||X</OUT>
</item>
<item>
<OUT>2008|1100|10|1I|11IB|IBE|050|91M51|SP|N201|91M51-N201|0001124630|Camp Chemical Corp.| 0||000000000000000|000000000000000| 0|000000000000000|X|X||NON-WINTER PRODUCTION| 1|||X</OUT>
</item>
</MATMAN_STRING_OUT>
</Z_RFC_GET_TERRITORY_PRVDRS.Response>
</RESPONSE>
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 05, 2008 3:54 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What's wrong with
Code:
DECLARE nextItem REFERENCE TO InputRoot.RESPONSE."ZRFC_GET_TERRITORY_PRVDRS.Response".MATMAN_STRING_OUT.item[];


?

Also, you need to apply a trout to your message designer. Those are absolutely horrible tag names.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
schroederms
PostPosted: Wed Mar 05, 2008 4:27 pm    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

Thanks.

I have no control over the tag names.... That is SAP for you.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 05, 2008 5:38 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

schroederms wrote:
I have no control over the tag names.... That is SAP for you.


Well, at least Broker lets you put something sensible in the output.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 06, 2008 12:56 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
What's wrong with
Code:
DECLARE nextItem REFERENCE TO InputRoot.RESPONSE."ZRFC_GET_TERRITORY_PRVDRS.Response".MATMAN_STRING_OUT.item[];
?
This one's easy : you should always check LASTMOVE after DECLAREing a reference...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 06, 2008 2:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kimbert wrote:
Quote:
What's wrong with
Code:
DECLARE nextItem REFERENCE TO InputRoot.RESPONSE."ZRFC_GET_TERRITORY_PRVDRS.Response".MATMAN_STRING_OUT.item[];
?
This one's easy : you should always check LASTMOVE after DECLAREing a reference...



_________________
I am *not* the model of the modern major general.
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 » Locating a tag occurrance within a XML message
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.