# XMLExtract Extracting Wrong Field

**URL:** <https://forum.cloverdx.com/t/xmlextract-extracting-wrong-field/1711>\
**Category:** CloverDX Platform\
**Created:** [January 26, 2016, 12:00am UTC](https://forum.cloverdx.com/t/xmlextract-extracting-wrong-field/1711 "2016-01-26T00:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![harvardpan](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.cloverdx.com/harvardpan/32/94_2.png) [@harvardpan](https://forum.cloverdx.com/u/harvardpan)\
**Post date:** [January 26, 2016, 12:00am UTC](https://forum.cloverdx.com/t/xmlextract-extracting-wrong-field/1711/1 "2016-01-26T00:00:00Z")

</div>

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](https://cdn.cloverdx.com/forum/18184%5F340a87e6060467edafd62b9d84387dde/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

- [working.xml](https://cdn.cloverdx.com/forum/18184%5F340a87e6060467edafd62b9d84387dde/working.xml)
- [notWorking.xml](https://cdn.cloverdx.com/forum/18184%5F9fb2fd21229811de571abccac8348659/notWorking.xml)
- [xml-bug.grf](https://cdn.cloverdx.com/forum/18184%5F90dbfdd3a048093c6522905d9adc78bf/xml-bug.grf)

---

<div class="post-metadata">

**Author:** ![slechtaj](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@slechtaj](https://forum.cloverdx.com/u/slechtaj)\
**Post date:** [February 1, 2016, 4:30pm UTC](https://forum.cloverdx.com/t/xmlextract-extracting-wrong-field/1711/2 "2016-02-01T16:30:22Z")

</div>

Hi Harvard,

The [issue](https://bug.javlin.eu/browse/CLO-8009) 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.
