From Thursday, July, 9, 3:00 PM Pacific,
our Community site will be in
read-only mode
through Sunday, July 12th.
Thank you for your patience.

xml file

Highlighted
Seven Stars

xml file

Hi All,

I have a requirement where i need to process the xml file and am processing xml file first time,i tried configuring with the help got in the community and documnets but not able to read it properly so can you please help in configuring the xml.please find the attachment the sample xml file
thanks,
Lmit


Accepted Solutions
Highlighted
Moderator

Re: xml file

@lmit ,Please accept the solution.

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

View solution in original post


All Replies
Highlighted
Seven Stars

Re: xml file

Hi All,

 

Any help on the below would be helpful.

 

Thanks in advance,

lmit

Highlighted
Seven Stars

Re: xml file

Hi all,

I tried all the ways to process the attached XML but failed

Any help would be really helpful

Thanks in advance,
Lmit
Highlighted
Moderator

Re: xml file

@lmit ,what was the problem and share the way and what error are you getting?

 

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Seven Stars

Re: xml file

Hi Manohar,

 

I have a sample xml file whcih is the structure of my output file . so i was trying to read the the xml.

 

evenafter giving the tag in the mapper am not getting the schema whcich is matching the sample file. few feilds are missing.

 

attaching xml &  xsd file . can you tell the actually process of creating the xml file. i have followed the talend componenet documents but couldnot successed.

 

nothing specific error , not able to read correctly.

 

Thanks in Advance,

lmit

Highlighted
Moderator

Re: xml file

@lmit ,please check from the below output is got what ever you required.

 

Untitled.pngUntitled.png

 

output:-

.-----------+----------+----+--------------------+----------+--------------------------------+--------------------+----------------------+------------+-----------+------+-----+----------+----+----------+-----------------------+------+-------+---------+--------+---------------------+-----------+---------+---------.
| tLogRow_3 |
|=----------+----------+----+--------------------+----------+--------------------------------+--------------------+----------------------+------------+-----------+------+-----+----------+----+----------+-----------------------+------+-------+---------+--------+---------------------+-----------+---------+--------=|
|BankingCode|Date |Type|Denomination |CodCountry|Activity |IdentificationNumber|IdentificationRegister|Number |CounterCode|RibKey|Type1|Date1 |Name|BirthDate |IdentificationRegister1|Amount|Amount1|Currency1|Currency|IdentificationNumber1|CodCountry1|FirstName|LegalForm|
|=----------+----------+----+--------------------+----------+--------------------------------+--------------------+----------------------+------------+-----------+------+-----+----------+----+----------+-----------------------+------+-------+---------+--------+---------------------+-----------+---------+--------=|
|SN141 |08-01-0032|2 |WEAVE SENEGAL LTD SA|SN |Explotation du pétrole et du gaz|SNDKR2016B8393 |3 |000100143001|01001 |97 |1 |08-01-0032|Gaye|04-10-0008|1 |503420|600000 |FCFA |FCFA | 1848198900141 |SN |Babacar |SA |
'-----------+----------+----+--------------------+----------+--------------------------------+--------------------+----------------------+------------+-----------+------+-----+----------+----+----------+-----------------------+------+-------+---------+--------+---------------------+-----------+---------+---------'

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Seven Stars

Re: xml file

Thanks Manohar for your quick reply

 

i have send different xml file. few difference are there in the files. sorry about that.

 

I followed your screenshoots and tried to recreate the same. but when i gave first name & birth date after Denomination . these 2 columns are not coming one after the other.

 

Can you please show the mappping & schema for the new file whcih am attaching.

 

Thanks in advance,

lmit

 

Highlighted
Seven Stars

Re: xml file

Hi Manohar,

 

Please find the attachment for the mapping which i created. data is coming a one column.

 

Please suggest where am doing wrong.

 

Thansk in advance,

lmit

Highlighted
Moderator

Re: xml file

@lmit ,if your using the same sample file which you shared with me than the problem would be Xpath query.

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Seven Stars

Re: xml file

I used the file which i shared today.attraching here also

 

the screenshot which you shared with example.xml is little different to the one i shared today and the mapping i have shared today

 

Thanks,

lmit

Highlighted
Moderator

Re: xml file

@lmit ,with below xpath query, i am able to extract the data,please check the below screen.

 

Untitled.png

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Seven Stars

Re: xml file

Thanks manohar now am able to read it.

 

Once again thanks

 

thanks,

lmit

Highlighted
Moderator

Re: xml file

@lmit ,Please accept the solution.

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

View solution in original post

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog