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 (2.151 KB)
Since you’re specifying a namespace in your XML file (xmlns="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.
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.
I guess I needed to reply faster
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 :))