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 » DataInsert and Mapping : Could not map repeating XML element

Post new topic  Reply to topic
 DataInsert and Mapping : Could not map repeating XML element « View previous topic :: View next topic » 
Author Message
mbroker
PostPosted: Thu Jan 12, 2012 2:37 pm    Post subject: DataInsert and Mapping : Could not map repeating XML element Reply with quote

Newbie

Joined: 12 Jan 2012
Posts: 1

Hi,

I am using the DataInsert node to insert XML message to a table. The XML message contains few repeating elements without child elements. The table contains separate fields for each of this element. When I went to the mapping editor and dragged the xml element to the first column corresponding to the repeating XML element, I saw a for row inserted in the spreadsheet view which I think is OK. But, all the other mappings are inside this for including the mapping of non-repeating elements.

XML structure:
<body>
<e1>element1</e1>
<e2>element21</e2> <!-- occurs 0 to 2 times -->
<e2>element22</e2>
<e3>element3</e3>
</body>

Table columns:
e1
e21
e22
e3

Mapping needed:
<e1> --> e1
<e2> --> e21
<e2> --> e22
<e3> --> e3

What I see

for $source/body/e2
$db:insert
e1 -- $source/body/e1
e21 -- $source/body/e2
e3 -- $source/body/e2

What I need is when there are 2 entries of e2, I want e21 populated with the first entry of e2 and e22 populated by the second entry of e2.

I am not able to move the "for" inside the db:insert row to conditionally populate e21 and e22.

Is this something DataInsert node can do? Or, what is the best alternative?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Jan 13, 2012 2:48 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Best alternative IMHO is ESQL Compute node.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DataInsert and Mapping : Could not map repeating XML element
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.