echo ancestor-or-self::div selects the div ancestors of the context node and, if the context node is a div element, the context node as well
../xgrep "/xgrep-test/para/div/ancestor-or-self::div" xgrep-test1.xml

