Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Read, Validate and Insert an XML data into Mysql DB in Talend

Hi,
I will get an XML. I need to validate some fields of XML after that I need to Insert the data into DB. So please suggest me how to write the Talend Job for above operation..
Thanks in advance.
Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hi,
Please make sure your XML file is well-formed and then you can use talend component tFileInputXML to retrieve your attribution into relational table.
For well-formed XML validation, here is a related article http://stackoverflow.com/questions/6362926/xml-syntax-validation-in-java, hope it will be useful for you.

Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
I am inserting the below XML using the job.
<root>
<Department>
<deptId>D1</deptId>
<deptName>Mech</deptName>
<deptHeadName>Ashok kumar</deptHeadName>
</Department>
<Person>
<id>P1</id>
<lastName>kumar</lastName>
<firstName>Arif</firstName>
<firstName>Shyam</firstName>
<deatils>
<name>hnlk1</name>
<value>1678</value>
</deatils>
<deatils>
<name>hnlk2</name>
<value>1878</value>
</deatils>
<deptId></deptId>
</Person>
</root>
I am using attached job to insert the XML. If I want to change the values of some fields before insertion, which component I need to use?
0683p000009MBQg.jpg
Anonymous
Not applicable
Author

Hi,
Maybe you are looking for this related forum https://community.talend.com/t5/Design-and-Development/resolved-Open-XML-files-and-modify-content/td....
Best regards
Sabrina