You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2017-04-04 08:51:11

GulshanSanaik
Member
3 posts

GulshanSanaik said:

Talend XML components for getting attributes in quotes

Using tWriteXML component I am able to get this Output
----------------------------------

<Contacts>
<row no="1">
    <FL Name="Daouda Doumbia"></FL>
    <FL Email="test1@test1.com""></FL>
    <FL First_Name="Daouda"></FL>
    <FL Last_Name="Doumbia"></FL>
    <FL Phone="00001"></FL>
    <FL Area="509"></FL>
  </row>
<row no="2">
    <FL Name="Zamantungwa Sikosana"></FL>
    <FL Email="test@test1.com"></FL>
    <FL First_Name="Zamantungwa"></FL>
    <FL Last_Name="Sikosana"></FL>
    <FL Phone="0"></FL>
    <FL Area="(NULL)"></FL> 
  </row>


</Contacts>

------------------------------------------

But desired output is something like this

------------------------------------------

<Contacts>
<row no="1">
<FL val="First Name">Scott</FL>
<FL val="Last Name">James</FL>
<FL val="Email">test@test.com</FL>
<FL val="Department">CG</FL>
<FL val="Phone">989898988</FL>
<FL val="Fax">99999999</FL>
<FL val="Mobile">99989989</FL>
</row>

<row no="2">
<FL val="First Name">Amber</FL>
<FL val="Last Name">Amber</FL>
<FL val="Email">test1@test.com</FL>
<FL val="Department">CG</FL>
<FL val="Phone">989898988</FL>
<FL val="Fax">99999999</FL>
<FL val="Mobile">99989989</FL>
<FL val="Assistant">John</FL>
</row>

</Contacts>

------------------------------------
Is it possible to get this kind of output using any XML component or i have to write java code?
I am attaching my job design.
mini_jobDesign.png mini_tWriteXMLField.png_20170404-0048.png
 


Regards
Gulshan

Last edited by GulshanSanaik (2017-04-04 08:56:51)

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy