Closed lilyball closed 6 years ago
Apple's plist code also doesn't indent the child of the <plist>
tag.
Ultimately, I'd like to be able to deserialize a plist created from Apple's tools, and then reserialize it, and end up with the exact same file (modulo dictionary key order).
It appears as though Apple's code also indents using hard tabs.
I looked into implementing the DOCTYPE part myself and it doesn't really appear doable with xml-rs. I filed https://github.com/netvl/xml-rs/issues/168 on their end, but in the meantime it looks like the only way to do this is to write out the raw text to the writer prior to constructing the XmlWriter
for it. The downside here is it means we would write to the writer immediately in EventWriter::new()
, which is fairly odd. Alternatively we could replace the writer with an enum to represent the "we haven't written anything yet" state, but it seems kind of gross.
A proper plist includes a DOCTYPE
The output from this crates does not include this doctype.
Also, less importantly, the output from Apple's plist code capitalizes the encoding name, i.e.
but the output from this crate lowercases it.