echo ancestor::div selects all div ancestors of the context node
../xgrep "/xgrep-test/para/div/para/ancestor::div" xgrep-test1.xml
../xgrep "/xgrep-test/para/div/ancestor::div" xgrep-test1.xml

