Getting closer. Have a valid query: xmlstarlet sel -t -m "greeter/item[@type='rect']/fixed/item[@type='pixmap']/normal[@file='logo.png']" -v "./following-sibling::pos/@y" caledonia.xml 54