Quantcast
Channel: SCN : Unanswered Discussions - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 6719

Mapping Help

$
0
0

Hi All,

 

I have a specific requirement where I have to repeat a target segment with respect to the integer value of a source element.

 

Source Structure

<Ticket Print>

--> Store(0..1)

-->TicketSize(0..1)

--> Item(0..n)

------>Header(0..1)

------>Counter(0..1)

------->StartDate(0..1)

-------->TicketQty(0..1)

 

Target Structure is also same

But I have to repeat Item node with respect to ticket quantity.

 

Source XML

<Ticket Print>

<Store>23<Store>

<TicketSize>2</TicketSize>

<Item>

----><Header>A</Header>

----><Counter>1</Counter>

----><StartDate>20130517</StartDate>

----><TicketQty>2</TicketQty>

<Item>

----><Header>B</Header>

----><Counter>2</Counter>

----><StartDate>20130517</StartDate>

----><TicketQty>1</TicketQty>

 

TargetXML

 

<Ticket Print>

<Store>23<Store>

<TicketSize>2</TicketSize>

<Item>

----><Header>A</Header>

----><Counter>1</Counter>

----><StartDate>20130517</StartDate>

----><TicketQty>1</TicketQty>

<Item>

----><Header>A</Header>

----><Counter>1</Counter>

----><StartDate>20130517</StartDate>

----><TicketQty>1</TicketQty>

<Item>

----><Header>B</Header>

----><Counter>2</Counter>

----><StartDate>20130517</StartDate>

----><TicketQty>1</TicketQty>

 

So the Item node shud repeat as per the value of ticket qty in source.

Ticket qty will have only value 1 in XML.

 

Can you please suggest any idea on how to proceed.

 

Regards,

Malini


Viewing all articles
Browse latest Browse all 6719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>