Closed cmarkle closed 1 year ago
Hi, in general, Saxy treats every character matching CharData
the same way. In this particular case, yes you can count on that \n
will always be emitted as \n
, \r
as \r
and so on.
@qcam Thanks for the clarification. I am going to close this issue.
We're trying to parse XML output from Amazon S3 APIs when the file/object name might end (inappropriately but it is possible) with \n or \r characters. Right now we are using SweetXml but the case with "xxx\r" is getting parsed to "xxx\r" which, if we returned that as the name to S3, is not what we got in the first place.
Parsing \r | \n with SweetXml.parse:
...basically \n and \r are each mapped to \n, probably as intended by XML spec.
I see that Saxy distinguishes between these two characters and \r is NOT mapped to \n.
Parsing \r | \n with Saxy.SimpleForm:
...basically \n and \r are treated distinctly, each mapping to same in result
This would be helpful to me in this case, but I guess my question is this something we can count on staying this way with Saxy?