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 failed to navigate path error

Post new topic  Reply to topic
 XML failed to navigate path error « View previous topic :: View next topic » 
Author Message
goldym
PostPosted: Thu Jun 30, 2005 9:08 am    Post subject: XML failed to navigate path error Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

I am getting a failed to navigate element path with the following ESQL

DECLARE temptotalmtm CHAR;
DECLARE ExternalID REFERENCE TO InputBody.(XML.Element)Trade.EconomicEvent.Trade.PricingEvent;

SET temptotalmtm = THE(SELECT ITEM R.ExternalID.(XML.Attribute)amount FROM InputBody.(XML.Element)EconomicEvent.Trade.PricingEvent[] AS R

WHERE R.ExternalID.(XML.Attribute)eventtype = 'totalmtm');

Here is my XML:

<?xml version="1.0" encoding="UTF-8"?>
<EconomicEvent site="LON" eodgroupname="rates" eventdate="20050609" runid="100981">
<Trade cpacronym="ALLEICGB" legalentity="BOANA0" book="LGBP" product="1" glcategory="1" frontofficenumber="13082689" sourcesystem="ADV">
<ExternalID externaltype="backofficeid" value="1301254"/>
<ExternalID externaltype="groupnum" value="0"/>
<PricingEvent eventtype="totalmtm" amount="-261432.85399047844" currency="GBP"/>
<PricingEvent eventtype="unsettleintaccrualliability" amount="70832.19178082192" currency="GBP"/>
<PricingEvent eventtype="unsettleintaccrualasset" amount="71494.86301369862" currency="GBP"/>
</Trade>
</EconomicEvent>
Back to top
View user's profile Send private message
JT
PostPosted: Thu Jun 30, 2005 9:57 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

I'm confused as to what you're trying to achieve (the references to the ExternalID elements are throwing me off), but it appears that you want the amount value from the PricingEvent element when the eventtype attribute on the PricingEvent is 'totalmtm'. If that's the case, then I think this is what you're looking for:

Code:
DECLARE tradeRef REFERENCE TO InputBody.EconomicEvent.Trade;
DECLARE temptotalmtm CHARACTER THE(SELECT ITEM R.(XML.Attribute)amount FROM tradeRef.PricingEvent[] AS R WHERE R.(XML.Attribute)eventtype = 'totalmtm');

If not, then please clarify your requriement.
Back to top
View user's profile Send private message
goldym
PostPosted: Thu Jun 30, 2005 10:21 am    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

Yes that's what I was trying to do. Thanks so much it worked.
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 » XML failed to navigate path error
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.