Leave feedback
  • Input block order of input file keep same in output file

Write an Article
Thursday 19 November, 2015
Rajkumar Aoutade Rajkumar Aoutade
2 likes 1091 views

Incoming data order in input file wants to keep as it is in output file.

 

In input file if you have repetitive data one after another and you want to print it as it is into the output file, yes you can do it as below.
sample  input file format 

 

In input file if you have repetitive data one after another and you want to print it as it is into the output file, yes you can do it as below.


sample  input file format :

<document1>

<main>

<mname>I am main1</mname>

</main>

<main>

<detail>

<dname>Detail1</dname>

</detail>

<kai>

<kname>Kai1</kname>

</kai>

<detail>

<dname>Detail2</dname>

</detail>

<kai>

<kname>kai2</kname>

</kai>

</main>

</document1>

into the input event add these type of sample file it looks like 

image

 

In storyteller you add one table and give the repeatative to Block_detail and Block_kai as below for each row. Create a parent repeater for these block like 'Repeater'

image

xpath on these repeater should be as below in this example

for 'Repeater' add like   /data/message/*/*[*]

Note : here the blocks detail and kai are nested so used /*/* if its not then use only /*

for nested repeater for 'Block_detail' add like self::*[name() = 'Block_detail']

for nested repeater for 'Block_kai' add like self::*[name() = 'Block_kai']

once you run this project and you can find the output as below.

image

 

enjoy streamserve.....

 

Comments (0)

   


Post comment