bin/scan: xpath preparation