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

