Forum Discussion

Multiplan_Suppo's avatar
Multiplan_Suppo
New Contributor
12 years ago

[Resolved]Help iterating through an XML datasource

Hi,

I am attempting to iterate through an XML list so that I can validate each element and was following the below tutorial on your website.

http://blog.smartbear.com/api-testing/h ... in-soapui/

So far I was able to set up the XML data source and declare my row xpath but after declaring my column xpath and running the test case I get the correct amount of rows but no data returned.

It seems the instructions for selecting the columns are unclear or I am missing something.

I have tried creating the property exactly as the element I want passed and leaving the /text() string. Also I tried using the select button to choose the element and xpath of the element I wanted passed to the property. No matter what I put in the column xpath both though I am unable to get data returned.

Please advise.

Thanks,

Joe

Edit:

Added SOAPui error log. It appears to have an issue with the Prefix in the XML.

2 Replies

  • In some cases the column XPath may require a namespace declaration that may not have been automatically added. Try adding the namespace and see if that works.

    Thanks,
    Michael Giller
    SmartBear Software
  • I was able to get it working by using variables to bypass the namespace declaration.

    It was declared properly in the row xpath but just didn't seem to carry over to the column xpath.

    Below is the statement I used to achieve this:

    *[local-name()= 'OfficeTypeCode']