XMLExtract Extracting Wrong Field

I’m using CloverETL Designer Community, Version 4.1.1.040. I’m trying to use the XMLExtract component, but running into a strange issue that seems like a bug. I’ve created a small reproducible graph to illustrate the problem.

Here is the Graph
working.xml

In the nonWorking.xml, I’m trying to get the element’s id attribute (value is 162). However, the graph ends up picking up what I believe to the campus’s id attribute (value is 1). In the working.xml, I removed the campus element and the correct value is picked up. Per a previous thread, I made sure that the auto map is not set and that the output metadata is mapping to a field called individualid instead.

Is this a bug, or is there something that I can do in the mapping XML to ensure that it picks up the right id value?

Thanks so much!
Harvard

Hi Harvard,

The issue is caused by “Use nested nodes” attribute (true by default) in XMLExtract. You can easily resolve the issue if you turn the attribute off.

Hope it helps.