problem with particular transformation XML to XML

Guest

suggestion with transformation XML to XML

Hi,

I have a problem with the translation from XML to XML. I would like to create a file output XML in witch I have some ugual node but with a sub-node that represented the identifier. I report an example:

<root>
    <nodo>
        <id>1</id>
    </nodo>
 
    <nodo>
	<id>2</id>
        <nodo></nodo>
    </nodo>
</root>

I have some difficult in mapping the first file xml with this file because I can't create a metadata like this beacuse it don't permit the replication of the nodes. What can i do?

Attachments: 
marco83's picture
36
Joined: Jan 8 2008 - 7:27pm
Last seen: 15 years 3 weeks ago

4 Answers:

marco83,

The attached job shows an example of mapping to a nested XML node. In this example the source is just 1, 2, 3, ... coming from tRowGenerator. But the same ideas should apply for your XML source.

I hadn't worked with XML files before. Thanks to Parham from Talend who provided the sample!

Regards,
Matt
JasperSoft

[file name=SimpleXML.zip size=3255]

mdahlman's picture
33018
Joined: Mar 13 2007 - 2:43am
Last seen: 8 years 2 months ago
perfect! It's very useful.
The unique problem is that I don't use sequential ID but the ID is a specific number of 3 cipher.
How can I specify their values?
marco83's picture
36
Joined: Jan 8 2008 - 7:27pm
Last seen: 15 years 3 weeks ago
I don't understand your phrase "a specific number of 3 cipher".

Could you start a separate thread and provide more details and/or a sample of the source and the transformed data?

Regards,
Matt
mdahlman's picture
33018
Joined: Mar 13 2007 - 2:43am
Last seen: 8 years 2 months ago

Thanks for the reply.

This is an example of the situation:

<ROOT>
    <NODO>
	<ID>124</ID>
    </NODO>
    <NODO>
        <ID>209</ID>
    <NODO>
</ROOT>

where 124 and 209 are fixed number that identified a specific node and they are always present.

Regards,

Marco

marco83's picture
36
Joined: Jan 8 2008 - 7:27pm
Last seen: 15 years 3 weeks ago
Feedback