refactor warnings

warning is a hash with a :message key
add file path to warnings
use xpath notation in warning messages