Loading XML files to PostgreSQL database using Talend

One Star

Loading XML files to PostgreSQL database using Talend

Hi
We had of XML files that we loaded into our database, but each file only has 1 row in the table, where as each file has several rows. I believe this is because it is only recording the first entry for a node, and not all of the remaining entries. In the code example below, you will see that for Invoice items, there is 2 items in the code, but Talend is only picking up the first item, before being loaded into the database. Is there a way that the other items in the node that belong to the same tag can be imported into the database?
Thanks,
Killian
-<InvoiceItems>
 -<Item>
  <Description>ABC</Description>
  <Type>X-Ray</Type>
  <AmountExVAT>35.00</AmountExVAT>
  <InvoiceNumber/>
  <Date>2007-04-15</Date>
 </Item>
 -<Item>
  <Description>XYZ</Description>
  <Type>Medication</Type>
  <AmountExVAT>65.00</AmountExVAT>
  <InvoiceNumber/>
  <Date>2007-04-15</Date>
 </Item>
</InvoiceItems>
Moderator

Re: Loading XML files to PostgreSQL database using Talend

Hi,
Could you please check a component TalendHelpCenter:tFileInputMSXML which reads and outputs multiple schema within an XML structured file?
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.