CLA-535 Address boundary conditions and add tests for XML Parsing