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 » WMB 7 mapping node XPath expression syntax

Post new topic  Reply to topic
 WMB 7 mapping node XPath expression syntax « View previous topic :: View next topic » 
Author Message
dianmushkov
PostPosted: Wed Mar 19, 2014 3:47 am    Post subject: WMB 7 mapping node XPath expression syntax Reply with quote

Newbie

Joined: 09 May 2013
Posts: 9

Hi all
WMB 7.0.0.6
I have following xml
Code:

<additionalService>
<typeName>PRC</typeName>
               <actionCode>RNCRD</actionCode>
            </additionalService>
            <additionalService>
               <typeName>NFC</typeName>
               <code>AUTHORIZATION</code>
               <params>
                  <key>AddressType</key>
                  <value>SMS_AUTH</value>
               </params>
               <params>
                  <key>Language</key>
                  <value>BLG</value>
               </params>
               <params>
                  <key>Email</key>
                  <value>example@example.com</value>
               </params>
               <params>
                  <key>Phone</key>
                  <value>+00000000000</value>
               </params>
               
               <params>
                  <key>ActionCode_SMS</key>
                  <value>DIF_ACCHOLDER_SMS_ON</value>
               </params>
               <params>
                  <key>ActionCode_EMAIL</key>
                  <value>DIF_ACCHOLDER_EMAIL_ON</value>
               </params>
            </additionalService>   

            <additionalService>
               <typeName>NFC</typeName>
               <code>PAYMENT</code>
               <params>
                  <key>AddressType</key>
                  <value>SMS_PAYMENT</value>
               </params>
               <params>
                  <key>Language</key>
                  <value>BLG</value>
               </params>
               <params>
                  <key>Email</key>
                  <value>example@example.com</value>
               </params>
               <params>
                  <key>Phone</key>
                  <value>+00000000000</value>
               </params>
            </additionalService>



in mapping node FOR node I want to make XPath meaning of
$source/additionalService/params[../typeName='NFC']

Those give expression error.

Can somebody help?
Back to top
View user's profile Send private message
martinb
PostPosted: Sun Mar 23, 2014 1:02 am    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

Your XPath predicate is invalid, predicates filter a set of repeating elements by applying an expression on it's children

Code:
       parent[child expression]


As "typeName" is a child of the repeating element "additionalService" a valid predicate would be

Code:
  $source/additionalService[typeName='NFC']/params


This would provide a node set containing all "params" elements that are a child of an "additionalService" element that has typeName='NFC'
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Mar 23, 2014 6:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I believe what is really needed is more complex:
What I would want here are all the children of $source/additionalService, where typeName='NFC'. This would also give me the "code" that qualifies the list of parameters...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dianmushkov
PostPosted: Mon Mar 24, 2014 12:50 am    Post subject: Reply with quote

Newbie

Joined: 09 May 2013
Posts: 9

All complex stuff is comming from Mapping Node not from XPATH syntax. As soon as I know
from

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014484872

XPath syntax in the Mapping node does not support predicates

Please confirm?!
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 » WMB 7 mapping node XPath expression syntax
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.