Use same exception for failed XML parsing as JSON.
Allowed later versions of phpunit to stop travis breaking
Merge pull request #38 from richardmiller/use-same-exception

Use same exception for failed XML parsing as JSON.
Skip stripping attributes for HAL resources from JSON

If the HAL object wasn't created from XML there shouldn't be any attributes to strip. As we can't be sure that
all resources have a source format set, we can only test that the format has been set and it's not XML.