How to handle idRef in XML ?

Highlighted
Five Stars

How to handle idRef in XML ?

Hi,

I got an XML file to parse, this one got reference with idRef.
I want to go through them, and insert my XML elements to database, that mean that I have to insert referenced element before creating my key.

Is there a better method ?
Here's an example, near the start of the file :
<ASTl>
<AST00 id="1" name="test">
<AST01>3</AST01>
<AST02>String</AST02>
<AST25LEAl>
<LEA00 id="1">
<LEA01>true</LEA01>
<LEA02 idRef-LEA="22"/>

In the middle of file :
<LEA00 id="22">
<LEA01>true</LEA01>
<LEA03>1</LEA03>
<LEA04>1</LEA04>

Thanks a lot

Six Stars

Re: How to handle idRef in XML ?

Connect to tXmlMap and map only the fields you need

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog