Adds xpath to event