Page 1 of 1

XML Input Stage

Posted: Thu Feb 26, 2009 5:19 am
by ajmore
Hi,
I am using xml source file in which entity
ZARTICLE has following derivation and description respectively

ZCOMMIT01.ZCOMMIT01.ZARTICLE
/ZCOMMIT01/IDOC/Z1COMMDET/ZARTICLE/text()

Assuming my XML tag input is as follows,

<ZARTICLE>ABCDEF<\ZARTICLE>

In target i want
<COL1>ABC<\COL1>
<COL2>DEF<\COL2>

I am trying to do this in XML input stage derivation only while extracting, as below
COL1
ZCOMMIT01.ZCOMMIT01.ZARTICLE[1,3]
/ZCOMMIT01/IDOC/Z1COMMDET/ZARTICLE/text()

COL2
ZCOMMIT01.ZCOMMIT01.ZARTICLE[4,6]
/ZCOMMIT01/IDOC/Z1COMMDET/ZARTICLE/text()

I am not sure if it can be done in XML input stage only,if not then i have to use transformer stage after extracting ZARTICLE and split it there.

Please let me know best possible way.

Thanks :D

Posted: Thu Feb 26, 2009 7:10 am
by chulett
You are reading XML? Writing XML? Both? :?

Regardless, that 'split' will need to happen either in a Transformer or in a custom XSLT in an XML stage.

Posted: Thu Feb 26, 2009 7:49 am
by ajmore
Sorry for confusion caused chulett :oops:

Below job design may make my point clear

Row gen(with Zero rows) --->Transformer (1 column Filepath containing file location and name) ----> XML input (1 Column having Concatenated data ZARTICLE) ----> Dataset ( 2 columns Col1 and Col2 having ZARTICLE data splited).

What i am able to get from your reply is that i need to add another transformer after XML input stage. :(

Please suggest.

Thanks.

Posted: Thu Feb 26, 2009 9:50 am
by chulett
If you are writing XML to your dataset, then you need to be using the XML Output stage. And no, you need to split the field before you generate the XML.

Posted: Thu Feb 26, 2009 12:37 pm
by eostic
...bottom line ...don't try to do such transformations inside of XML stages...that's what the Transformer is for. Putting it inside of XML may be necessary for advanced techiques and purposes, but it should be the exception only...

Ernie