xpath Check if a node's text is empty Check if Deborah has a master and its text value is not empty


Example

XML

<Deborah>
    <address>Dark world</address>
    <master>Babadi</master>
    <ID>#0</ID>
    <colour>red</colour>
    <side>evil</side>
</Deborah>

XPATH

boolean(/Deborah/master/text())

OR

string(/Deborah/master) != ''

OUTPUT

true