child::chapter[child::title] selects the chapter children of the context node that have one or more title children Title Introduction </chapter> <?xgrep-match [xgrep-test1.xml]--------------------------------?> <chapter> <title/> </chapter>