# Urgent problem with XML Iterator

**URL:** https://www.finalbuilder.com/forums/t/urgent-problem-with-xml-iterator/357
**Category:** Discussion
**Created:** [February 14, 2007, 10:18am UTC](https://www.finalbuilder.com/forums/t/urgent-problem-with-xml-iterator/357 "2007-02-14T10:18:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![nirsilgi](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/a6a055/32.png) [@nirsilgi](https://www.finalbuilder.com/forums/u/nirsilgi)
#### Post date: [February 14, 2007, 10:18am UTC](https://www.finalbuilder.com/forums/t/urgent-problem-with-xml-iterator/357/1 "2007-02-14T10:18:06Z")

</div>

Hi,  
  
I’m having a problem itarating through a specific XML file. The iterator returns no nodes.  
In the past I used the same XML with success, but since we didn’t release this module in a while, I didn’t run this action for a long time (I think but not sure that the last time was with FB4).  
I tried it with FB5 builds 60, 71, 118, 122 and it fails in all of them (returns no nodes)  
  
Attached is a zip file with a sample project and the XML file.  
  
(for the future I’m not sure if it’s better to send it here or to support)  
  
Thanks,  
NirS  
[Test\_XML\_Iterator.zip](https://www.finalbuilder.com/forums/uploads/default/original/2X/a/a62c5ba07657f46fd615fe2a9ab6dd6b3e81457e.zip) (2.151 KB)

---

<div class="post-metadata">

### Author: ![robert.wachtel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@robert.wachtel](https://www.finalbuilder.com/forums/u/robert.wachtel)
#### Post date: [February 14, 2007, 4:12am UTC](https://www.finalbuilder.com/forums/t/urgent-problem-with-xml-iterator/357/2 "2007-02-14T04:12:38Z")

</div>

Since you’re specifying a namespace in your XML file (_xmlns="[http://tempuri.org/DomainLoad25.xsd](http://tempuri.org/DomainLoad25.xsd)_) you should try the following:  
  
Go to the **MSXML Parser** tab of the **XML Node Iterator** action and select **Expand namespace prefixes declared in the document root node** and name an identifier prefix (i.e. _x_).  
  
Modify the XPath to something similar like this:  
  
_/x:DN/x:Cluster/x:ClusterElem/x:Machines/x:Machine_  
  
and there you should go.

---

<div class="post-metadata">

### Author: ![rlove](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/rlove/32/27_2.png) [@rlove](https://www.finalbuilder.com/forums/u/rlove)
#### Post date: [February 14, 2007, 4:29am UTC](https://www.finalbuilder.com/forums/t/urgent-problem-with-xml-iterator/357/3 "2007-02-14T04:29:40Z")

</div>

This because you have a default namespace on the document. This catches many people the first time the run into it.  
  
You have tell XML/XPath Parser what the prefix is for the default namespace. In FinalBuilder this can be done on the MSXML Parser tab of the Iterator Properties. I set it to "x"  
  
Then changed the XPath to use that prefix.  
  
/x:DN/x:Cluster/x:ClusterElem/x:Machines/x:Machine  
  
Which returned the rows.

---

<div class="post-metadata">

### Author: ![rlove](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/rlove/32/27_2.png) [@rlove](https://www.finalbuilder.com/forums/u/rlove)
#### Post date: [February 14, 2007, 4:30am UTC](https://www.finalbuilder.com/forums/t/urgent-problem-with-xml-iterator/357/4 "2007-02-14T04:30:32Z")

</div>

I guess I needed to reply faster

---

<div class="post-metadata">

### Author: ![nirsilgi](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/a6a055/32.png) [@nirsilgi](https://www.finalbuilder.com/forums/u/nirsilgi)
#### Post date: [February 14, 2007, 9:35am UTC](https://www.finalbuilder.com/forums/t/urgent-problem-with-xml-iterator/357/5 "2007-02-14T09:35:24Z")

</div>

Well it sounds complicated and I can’t tell you that I understand what I just did, but IT WORKS!! Thanks much!!  
  
(as u may guess I’m not expert in XML and Xpath :))
