Issue
I have the below xml as response from one end system . I want to write Junit test case using assert condition for evaluating the element values.
xml is :
<?xml version="1.0" encoding="UTF-8"?>
<table>
<record>
<field name="name" type="java.lang.String">whiteskylabs</field>
</record>
</table>
Is there anyway in Junit to use Xpath. If can u please help me out on it. Regards Vikram
Solution
You could use a separate helper test flow for the XPath evaluation, or just plain Java XPath. See here for an example of Java XPath: http://www.rgagnon.com/javadetails/java-0550.html
Answered By - Anton Kupias
Answer Checked By - Pedro (JavaFixing Volunteer)