Skip to main content
Tweeted twitter.com/super_user/status/1373107220146233350
added 9 characters in body; edited title
Source Link
slhck
  • 230.2k
  • 71
  • 621
  • 603

Is there any How can I diff tool fortwo XML files?

Are there any good (Linux) tools for diffingOn Linux, how could I generate a diff between two XML files?

Ideally, I would like to be able configure it to some things strict, or loosen some things, like whitespace, or attribute order. 

I'll often care that the files are functionally the same, but diff by itself, would be annoying to use, especially if the XML file doesn't have a lot of linebreaks. 

For example, the following should really be okay to me:

<tag att1="one" att2="two">
  content
</tag>

<tag att2="two" att1="one">
  content
</tag>

Is there any diff tool for XML files?

Are there any good (Linux) tools for diffing two XML files?

Ideally, I would like to be able configure it to some things strict, or loosen some things, like whitespace, or attribute order. I'll often care that the files are functionally the same, but diff by itself, would be annoying to use, especially if the XML file doesn't have a lot of linebreaks. For example, the following should really be okay to me:

<tag att1="one" att2="two">
  content
</tag>

<tag att2="two" att1="one">
  content
</tag>

How can I diff two XML files?

On Linux, how could I generate a diff between two XML files?

Ideally, I would like to be able configure it to some things strict, or loosen some things, like whitespace, or attribute order. 

I'll often care that the files are functionally the same, but diff by itself, would be annoying to use, especially if the XML file doesn't have a lot of linebreaks. 

For example, the following should really be okay to me:

<tag att1="one" att2="two">
  content
</tag>

<tag att2="two" att1="one">
  content
</tag>
Source Link
qedi
  • 1.6k
  • 2
  • 12
  • 10

Is there any diff tool for XML files?

Are there any good (Linux) tools for diffing two XML files?

Ideally, I would like to be able configure it to some things strict, or loosen some things, like whitespace, or attribute order. I'll often care that the files are functionally the same, but diff by itself, would be annoying to use, especially if the XML file doesn't have a lot of linebreaks. For example, the following should really be okay to me:

<tag att1="one" att2="two">
  content
</tag>

<tag att2="two" att1="one">
  content
</tag>