fix up xml parsing and add tests for it
fix issue with failing test