Hi,
I am using XMLExtract for reading xml files. I have a doubt regarding parentKey&generatedKey feature to copy parent data to child.
Consider below data and extraction mapping :
Data :
<department>
<employee>
<id>E001</id>
<name>emp1</name>
<deptRef></detpRef>
</employee>
<id>D001</id>
<name>Dept1</name>
</department>
Extraction Mapping :
<Mappings>
<Mapping element="department" outPort="0" xmlFields="{}id;{}name" cloverFields="deptId;name">
<Mapping element="employee" outPort="1" xmlFields="{}id;{}name" cloverFields="id;name" parentKey="deptId" generatedKey="detpRef">
</Mapping>
</Mapping>
</Mappings>
In the above scenario, I am trying to copy department id field data to employee field which is ‘deptRef’. But department ‘id’ comes after ‘employee’ in the data file. As data is read using XMLExtract (SaxParser), will the above case works fine ? Will ‘deptRef’(of employee) gets the value of ‘id’(of department) ?