Serg1981
13 years agoOccasional Contributor
Assert kml elements in soapUI
I have kml response, so is it possible to assert elements with XPath assertions?
I know that element can be found with contain/not contain assertions, but I'd like to find elements with something like XPath (IMHO: this assertion type is the best for xml based responses). Is there a way to convert kml response to xml to use XPath assertions?
For example, I need to check coordinates within the response:
I cannot find element <coordinates>5, 2</coordinates> with XPath: "//kml/Document/Placemark/ComponentString[1]/coordinates"
Any suggestions?
Thanks in advance.
I know that element can be found with contain/not contain assertions, but I'd like to find elements with something like XPath (IMHO: this assertion type is the best for xml based responses). Is there a way to convert kml response to xml to use XPath assertions?
For example, I need to check coordinates within the response:
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:ns2="http://www.w3.org/2005/Atom" xmlns:ns3="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
<Document>
<name>System Layer</name>
<Placemark>
<name>Name1</name>
<ComponentString>
<coordinates>5, 2</coordinates>
</ComponentString>
</Placemark>
<Placemark>
<name>Name2</name>
<ComponentString>
<coordinates>6, 8</coordinates>
</ComponentString>
</Placemark>
</Document>
</kml>
I cannot find element <coordinates>5, 2</coordinates> with XPath: "//kml/Document/Placemark/ComponentString[1]/coordinates"
Any suggestions?
Thanks in advance.