On 11/12/2010, Nikolay Shaplov <[email protected]> wrote: > > This is not diff safely :-/ > > Are there any chance to keep formatting as it were, at least for > elements that were not changed during tree elements manipulation? May > be there is some parsing options I do not know of?
This kind of formatting is not in the infoset[0] so not preserved from parsing. The general solution to your problem with text diffs is to consistently output a canonical form[1], which will ensure the serialised representation won't change if the stuff you care about doesn't. Martin [0] What is not in the Information Set "17. The kind of quotation marks (single or double) used to quote attribute values." <http://www.w3.org/TR/xml-infoset/#omitted> [1] The libxml2 "Canonical XML" implementation <http://xmlsoft.org/html/libxml-c14n.html> _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
