XML parsing with unit testing