Originally posted by: SystemAdmin
I have a situation in which I have to generate one xml, and embed that xml in another xml. I am trying to simplify my problem with an example -
Consider I have 2 xsd's - employee.xsd and salary.xsd.
salary.xsd generates an xml in which I have the split of my salary structure. So, a very basic salary.xml would look like -
<salary>
<basic>1000</basic>
<tax>50</tax>
<HRA>123</HRA>
</salary>
employee.xsd generates an xml in which we have all the details of an employee like name, age, DOB and a also tag called as salarystructure. I want to embed the salary xml (shown above) inside this salarystructure tag. So, a very basic employee.xml would look like:
<employee>
<name>Anannya</name>
<age>26</age>
<DOB>3rd Feb</DOB>
<salarystructure>
<salary>
<basic>1000</basic>
<tax>50</tax>
<HRA>123</HRA>
</salary>
</salarystructure>
</employee>
Can anyone please let me know how to do this in WTX? I tried using 2 output cards with the "Onsuccess -> append" option applied for the 2nd one, but the salary xml gets appended to the employee xml at the very end i.e. at after the </employee> tag. This is not what I want. I want to EMBED it in between. Any inputs?
#IBM-Websphere-Transformation-Extender#DataExchange#IBMSterlingTransformationExtender