Is there anyway to merge 2 XML documents. I don't want to concat them,I want to merge them.
I have 2 transformers generating 2 different XML's but the output has to be a single XML.Is there any way to accomplish this?
Thanks and Regards,
Bakul
Merge 2 XML documents
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Have you looked at the Merge stage? You would send the output of the transformers to a merge stage and then to an XML stage.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Good point, the other stage is the link collector, which will bring them into a single stream and let you use column ordering to mix them up. You might be able to output it as a single XML document. The XML output stage may do the merge for you.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Vincent,
Thanks for the reply. I have the following situation.
Suppose, for example one XML file has store name and store id. The other XML file has store id, product id and product name.
The target XML file to include all the products in a given store before moving to the next store.
In that scenario, will this solution work? Or would I need to do something different?
Thanks for any help.
Thanks for the reply. I have the following situation.
Suppose, for example one XML file has store name and store id. The other XML file has store id, product id and product name.
The target XML file to include all the products in a given store before moving to the next store.
In that scenario, will this solution work? Or would I need to do something different?
Thanks for any help.