1

Is there any possibility to remove invalid characters from XML response before trying to read entity?

Response searchResponse = webTarget.request(MediaType.APPLICATION_XML).get();
/..
SearchOutput searchOutput = searchResponse.readEntity(SearchOutput.class);

This code works fine when XML is correct but fails when response contains invalid Unicode characters.

How to workaround that assuming I can't change these invalid data in a database?

Kamila
  • 371
  • 5
  • 13

0 Answers0