tFileOutputXML / tAdvancedFileOutputXML

One Star

tFileOutputXML / tAdvancedFileOutputXML

Hi
I found a problem, maybe a bug with the tAdvancedFileOutputXML component.
I need to set an attribute named "xmlns" but when I want to add an attribute in the XML Tree,
this attribute cannot have a name containing any "xml" string, and it is the same
for the element name.

In facts, with the tFileOutputXML, I can make this:
In TOS, the properties of the tFileOutputXML are:
Root tags (only one) : "catalog"
Row tag : netcdf
Output format:
column xmlns , as attribute checked , label = xmlns
column location , as attribute checked , label = location
column ncml , as element (as attribute unchecked) , label = ncml
The result is:
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
location="/path/to/file.nc">
<ncml> __NCML__ </ncml>
</netcdf>
</catalog>
And I would like to have:
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
location="/path/to/file.nc">
__NCML__
</netcdf>
</catalog>
(__NCML__ is just the string that may be contained into the netcdf element)

The second thing is that I can't find how to use the tAdvancedOutputFileXML component, it seems
I have to drag and drop items from Schema List but they can't be dropped anywhere.
I wonder if the tAdvancedFileOutput could help me to generate a XML file like the following
(I think I can't do it with the tFileOutputXML):
<catalog name="TEST_NCML" xmlns="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0"
xmlns:xlink="http://www.w3.org/1999/xlink">
<service name="latest" serviceType="Resolver" base="" />
<service name="multiService" serviceType="Compound" base="">
<service name="dods" serviceType="OPeNDAP" base="/thredds/dodsC/" />
</service>
<dataset name="Ncml Agregated Static Join Existing" ID="ncmlDatasetAgregatedJoinExistingStatic"
urlPath="ncmlDatasetAgregatedJoinExistingStatic">
<metadata>
<serviceName>dods</serviceName>
<dataType>Grid</dataType>
<dataFormat>NetCDF</dataFormat>
</metadata>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<aggregation dimName="time" type="joinExisting">
<variableAgg name="temp" />
<netcdf location="/path/to/file_1.nc" />
<netcdf location="/path/to/file_2.nc" />
<netcdf location="/path/to/file_3.nc" />
<netcdf location="/path/to/file_4.nc" />
<netcdf location="/path/to/file_5.nc" />
</aggregation>
</netcdf>
</dataset>
</catalog>
Can someone give me some details about the components tFileOutputXML and tAdvancedFileOutputXML
and how to use them to do that ?
I'm using the TOS 2.2.0.GA_r6191 version.
Thanks
One Star

Re: tFileOutputXML / tAdvancedFileOutputXML

Ok, for the tAdvancedFileOutputXML, I think there is a bug of compatibility under Linux because when I use TOS under windows,
the properties are set in a single window where I can drag from linker source and drop to linker target, which is not possible
under Linux (I have 3 windows).
Concerning the use of the tFileOutputXML and tAdvancedFileOutputXML components, I still don't know how to obtain the
xml file described in my previous post.
So I still need some help, thanks a lot !
One Star

Re: tFileOutputXML / tAdvancedFileOutputXML

hi, can I put two tFileOutputXML in a single XML file??
Moderator

Re: tFileOutputXML / tAdvancedFileOutputXML

Hi maissa rezgui,
hi, can I put two tFileOutputXML in a single XML file??

Could you please elaborate your case with an example with input and expected output values?
In addition, please create a new post on forum which will give other users an opportunity to help you.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tFileOutputXML / tAdvancedFileOutputXML

ok mercii voici mon job et maintenant je veut que la sortie soit dans un seul fichier XML
Community Manager

Re: tFileOutputXML / tAdvancedFileOutputXML

Hi maissa
Maybe the 'append the source xml file' feature on tAdvacedFileOutputXML address your need? I explained this feature and showed a demo job in this topic:
http://www.talendforge.org/forum/viewtopic.php?id=5975

Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tFileOutputXML / tAdvancedFileOutputXML

thank you but I can not display all tables in a single XML file