[tFileoutputXML] Delete the "row tag"

One Star

[tFileoutputXML] Delete the "row tag"

Hi all,
When I generate an XML File, there automatically is the "row tag". Idon't want it to be included. I haven't seen any option that permits that.
How to manage that?
For example, in this XML File, the "row tag" is useless. nevertheless, it"s automatically included.
<?xml version="1.0" encoding="ISO-8859-15"?>
<N_PERIOD>
<row>
<YEAR_DF>1985</YEAR_DF>
</row>
<row>
<YEAR_DF>1986</YEAR_DF>
</row>
<row>
<YEAR_DF>1987</YEAR_DF>
</row>
<row>
<YEAR_DF>1988</YEAR_DF>
</row>
</N_PERIOD>

Thanks!
mathieu
Seventeen Stars

Re: [tFileoutputXML] Delete the "row tag"

hi,
when you write into a output xml file you may specify the name of Document element (root) in the 'row tag' ...
ok ! a little screen shoot for an SVG document for example
++
laurent
One Star

Re: [tFileoutputXML] Delete the "row tag"

hello,
Thanks for your answer
I put "N_PERIOD" as "row tag", which is also the root tag of my XML but it didn't work.
Could you tell me which "row tag" I have to put, in my case
Thanks!
Mat'
Seventeen Stars

Re: [tFileoutputXML] Delete the "row tag"

sorry ,
i've made a mistake :it's specified the name of the row (element) an wrap each row into this element ...
still have root document name = "row" at least
i've answer a little bit too fast ...
did you try with new component 3.1 like twritexmlfield !?
edit : have a look at this topic ...
I have learn something more today Smiley Happy
Community Manager

Re: [tFileoutputXML] Delete the "row tag"

Hello mathieu_r
When you output xml file, there must exist a loop element. Here, row tag is the loop element. So, we can't ignore it on output component.
Well, you can write some Java code to delete row tag after you output the xml file.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [tFileoutputXML] Delete the "row tag"

Ok thanks for your answer Smiley Wink
Highlighted
One Star

Re: [tFileoutputXML] Delete the "row tag"

I would advise to use xslt to structure the output xml as you need to.
But it's true, the first time, xsl-t doesn't seems easy. But manipulating hierarchical data is quite different to tabular, so it needs a different approach.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch