echo para[2][@type="warning"] selects the second para child of the context node if that child has a type attribute with value warning
../xgrep "/xgrep-test/para[2][@type='warning']" xgrep-test1.xml

