String = "<foo>A \ntest</foo>",
open_string(String, Read),
load_structure(Read, XML, [space(preserve)]),
close(Read),
XML = [element(foo, _, [Data])],
atom_codes(Data, Codes),
writeln(Codes).
despite the input document having \r\n explicitly in it. This is normally not a problem (after all, no one has complained for 15 years), but when you're signing the document, every byte matters.
For example,
produces
despite the input document having \r\n explicitly in it. This is normally not a problem (after all, no one has complained for 15 years), but when you're signing the document, every byte matters.