I have a sequential which contains the data as below.
EmpName,phonenumber,email
xyz,12345,xyz@xyz.com
xyz,12345,abc@abc.com
xyz,56789,xyz@xyz.com
xyz,56789,abc@abc.com
I have to prepare an XML file with repetitive elements from this data as below.
<Emp>
<EmpName>XYZ</EmpName>
<Phonenumber>12345</phonenumber>
<phonenumber>56789</phonenumber>
<email>xyz@xyz.com</email>
<email>abc@abc.com</email>
</Emp>
I am using XML stage and the job design as below.
Seqfile ------ > XML stage ------ > Seq File
In XML stage I am using the Regroup to delare parent and child elements and XML Composer to generate the XML file. But getting the below error.
" XML_16,0: Fatal Error: OperatorTransitionFailedAtRuntime operator = 'UserRuntimeOperatorFrame:Op-RT-2[XML_Composer]', cause = 'java.lang.ClassCastException: java.lang.Long incompatible with java.lang.String"
Not sure about am i specifying the properties in right way or not. Can anybody tell me what this error means or If you have any sample job/Doc please share with me.
Thanks !
How to create XML file with repetitive elements using XML st
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 10
- Joined: Thu Jan 06, 2011 1:02 am
- Location: Ramantapur,HYD
-
- Participant
- Posts: 10
- Joined: Thu Jan 06, 2011 1:02 am
- Location: Ramantapur,HYD
We'll assume for the moment that the emails and the phone numbers are not related?
Meaning...they are two separate lists within the xsd? both "maxOccurs=unbounded"?
...or are they related to each other (email #1 goes with phone #1, etc.). ?
Could there be 2 phone numbers and (for example), 15 emails?.
Whether they are related to each other in the xsd will have implications on the design of your assembly.
Ernie
Meaning...they are two separate lists within the xsd? both "maxOccurs=unbounded"?
...or are they related to each other (email #1 goes with phone #1, etc.). ?
Could there be 2 phone numbers and (for example), 15 emails?.
Whether they are related to each other in the xsd will have implications on the design of your assembly.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>