Pretty Print trimming spaces?
<element> data</element> becomes <element>data</element> with Pretty Print turned on, and any assertion on the value including those leading spaces will fail, since they were removed by Pretty Print. With Pretty Print turned off, the spaces remain and the assertion succeeds.
I'd like to be able to use Pretty Print, without it actually influencing values in XML elements and assertions to fail because of this.
Is this intentional? Can I circumvent this behaviour without losing the Pretty Print functionality?
Thanks in advance for any help!
Is this something that you plan to fix? There seem to be no good reason for trimming white-space within an element. It is actually altering the message data!
I found myself searching this same issue tonight. Turns out it's far from new, having been originally reported in 2007.
However, the issue is with the underlying library used to perform the 'pretty printing'. While they have no plans to change their behavior, someone did post a patch back in 2010 that could be manually applied. I have no idea if that patch is still relevant.