grantm/xml-simple — pull request #2 by masto (2013-05-23 13:22:46+00:00)
Title: Allow special escaping of whitespace in attribute values

XML normalization can get in the way if you're trying to put data with literal newlines, tabs, etc. in attribute values, as it requires them to be replaced with spaces by the processor. This can be avoided by escaping them:

> Note that if the unnormalized attribute value contains a character reference to a white space character other than space (#x20), the normalized value contains the referenced character itself (#xD, #xA or #x9). This contrasts with the case where the unnormalized value contains a white space character (not a reference), which is replaced with a space character (#x20) in the normalized value and also contrasts with the case where the unnormalized value contains an entity reference whose replacement text contains a white space character; being recursively processed, the white space character is replaced with a space character (#x20) in the normalized value.
(http://www.w3.org/TR/REC-xml/#AVNormalize)

This gives an option for doing so.