Sysmagine / SemanticDiff

Community support for SemanticDiff, the programming language aware diff for Visual Studio Code and GitHub.
https://semanticdiff.com
49 stars 0 forks source link

Add XML support #67

Open bannmann opened 3 months ago

bannmann commented 3 months ago

It would be great to have support for XML.

My use case is comparing WSDL files that unfortunately have different attribute ordering (which the XML spec says is irrelevant). In this situation, every other diff tool I know fails, even difftastic (see issue Wilfred/difftastic#758).

SemanticDiff, on the other hand, could easily treat the following files as equal (just like the Python example from the docs):

<foo bar="1" quux="true"/>
<foo quux="true" bar="1"/>
mmueller2012 commented 3 months ago

We already have an issue for XML support but it was always a bit unclear whether generic XML support would be useful. The spec does not really define when two documents are identical (with the exception of attribute reordering) and it is mostly up to application specific logic. If there are actual use cases that can benefit from generic rules (ignoring whitespace at the beginning/end of values or attribute reordering) we can take a look into adding support.

mmueller2012 commented 3 months ago

Duplicate of #18

williwusel commented 2 months ago

And please also add ignoring spaces before the closing tag . I need to do XSLT comparison which is basically an XML document and some of my tools add such a space like e.g. here: "\<Data />". It is valid XML but it really drives me crazy to see that being flagged as a valid diff.