Forum Discussion

mwalter's avatar
mwalter
Occasional Contributor
8 years ago

Looking for help on how to use xpath match to verify an empty node

Hi,

I have the following output of a JDBC query that I need to confirm the value in <_3></_3>, basically the data is the second line of an address.  When there is a value in the second line of the address, everything is fine but when there is only one line to the address and the second line is blank it comes back as below.   I'm trying to figure out how to configure the Expected Result in the Xpath Assertion for that value.  If I leave the Expected Result field blank, I suspect that everything will pass and it's not checking anything.  Null isn't correct either.  Need some thoughts on how to verify that no data comes back in that line.  Thanks in advance for any help/ideas.

 

<Results>
<ResultSet fetchSize="64">
<Row rowNumber="1">
<_2>450 N. SUNNYSLOPE RD.</_2>
<_3/>
<_4>BROOKFIELD</_4>
</Row>