Forum Discussion
Hi Robert,
As far as I see, the discussion has stopped as there was no answer from the topic starter. Could you please describe your task and the issue you faced in detail?
Hello Tanya!
The issue is that pretty print trims the content inside nodes in the XML.
E.g. I receive a response from the application:
<Person>
<Surname>Smith </Surname>
</Person>
The value for surname in the database is "Smith " and I wan't to compare the value in the XML with the value in the db using GroovyUtils.
However due to the trimming issue in pretty print the XML that is stored inside the XmlHolder is:
<Person>
<Surname>Smith</Surname>
</Person>
Hence, when I compare the values the assertion failes because "Smith" != "Smith ".
If I disable pretty print the correct value is returned, but the XML is not very readable (a typical response in my application is +5000 chars).
As I see it, pretty print altering the content of a node is a defect since the actual content of the response changes.
Best Regards
Robert
- TanyaYatskovska9 years agoSmartBear Alumni (Retired)
Hi Robert,
Thanks for your explanation. Didn’t you try the suggestion posted here to remove spaces from a response?
- rf9 years agoOccasional Contributor
Hello.
I'm sorry but the solution in the linked thread doesn't help. The problem is that SoapUI already removes spaces inside the node. Hence, the response presented in SoapUI does not equal the reponse sent from the server.
Is smartbear planning to fix the mentioned issue where pretty print trims node content?
Best Regards
Robert
Related Content
- 3 years ago
- 10 years ago
- 9 years ago