Fix XML path resolution (close #233, #228, #226)