You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just sharing a bit of code I'm using. For some context, I'm starting to use Saxy to build XML queries during testing. I must compare them to a baseline template, to ensure I used the Saxy.XML API correctly. These templates include newlines for human readability (indented/pretty-printed).
To make the comparison automated, I'm removing the non-significant newlines with the following code so far:
I think we can support an option like ignore_whitespaces: true in SimpleForm.parse_string. That would be helpful in this case. The option should default to false though to keep original behavior though.
Just sharing a bit of code I'm using. For some context, I'm starting to use Saxy to build XML queries during testing. I must compare them to a baseline template, to ensure I used the
Saxy.XML
API correctly. These templates include newlines for human readability (indented/pretty-printed).To make the comparison automated, I'm removing the non-significant newlines with the following code so far:
I can use this like this afterwards:
This makes it easier to compare this using
ExUnit
assert x == y
, for instance.I wonder if:
Saxy.SimpleForm.parse_string
(less sure at this point, we can mull over this!)Let me know what you think!
The text was updated successfully, but these errors were encountered: