xmldiff(1)
π xmldiff β like, the manual page, bestie π
okay so you found the xmldiff(1) page, and honestly? iconic. this is the whole thing, no skips, no cap. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
xmldiff β create a diff for two XML files. yes bestie, that's the whole vibe. π
πΈ SYNOPSIS πΈ
xmldiff [-h] [-v] [-f {xml,diff,old}] [-w] [-p] [-F F]
[--unique-attributes [UNIQUE_ATTRIBUTES]]
[--ratio-mode {accurate,faster,fast}] [--fast-match]
file1 file2
literally copy that, swap in your own file1 and file2, and you're already slaying. π¦
π DESCRIPTION π
so xmldiff is both a library and a command-line utility for making diffs out of XML. and yeah, at first you're like "bestie, don't we already have diff?" π and the answer is: not like this.
here's the tea β β change detection in hierarchical data is a whole different beast from change detection in flat data. and XML-type formats aren't just for computer-readable data either; they're lowkey often used as a format for hierarchical data that gets rendered into human-readable stuff. so a traditional diff on a format like that would tell you, line by line, what's different β but that would not be readable by a human. like, at all. it's giving chaos.
xmldiff provides tools to make human readable diffs in those exact situations. periodt. π
β¨ OPTIONS β¨
-h,--helpβ display help and exit. the classic "wait what does this do again" button. π«Ά-v,--versionβ display version and exit. vibe check the build. β-f,--formatterβ formatter selection. possible choices:xml,diff,old. default:"diff". pick your aesthetic. π-w,--keep-whitespaceβ do not strip ignorable whitespace. default:False. she keeps the whitespace, she's sentimental. π₯Ί-p,--pretty-printβ try to make XML output more readable. default:False. glow-up for your output. β¨-Fβ a value between0and1that determines how similar nodes must be to match. like a compatibility score for nodes, fr fr. π--unique-attributesβ a comma separated list of attributes that uniquely identify a node. can be empty. unique attributes for certain elements can be specified in the format{NS}element@attr. default:"{http://www.w3.org/XML/1998/namespace}id". this is how the nodes know who's who, iykyk. π--ratio-modeβ choose the node comparison optimization. possible choices:accurate,faster,fast. default:"fast". the "accurate / faster / fast" pipeline is such a mood. πβοΈπ¨--fast-matchβ a faster, less optimal match run. default:False. not perfect, but she's speedy and we respect her. π
π EXAMPLE π
the common usage, the everyday slay:
$ xmldiff file1.xml file2.xml
making an output a bit more human readable by structuring it with whitespace:
$ xmldiff -f xml -p file1.xml file2.xml
look at that. gorgeous. no notes. π
π₯ SEE ALSO π₯
xmlpatch(1). the sister page. go say hi. π«Ά
π AUTHOR π
xmldiff was written by Lennart Regebro <lregebro@shoobx.com> and Stephan Richter <srichter@shoobx.com>. legends, honestly.
this manual page was written by Thiago Andrade Marques <thmarques@gmail.com> for the Debian project (but may be used by others). we stan a generous queen. π
and that's the whole page, bestie! this was xmldiff-2.4, dated 04 Nov 2019 β so like, a little vintage, but still absolutely eating. go diff something pretty. πΈβ¨π
π¦ where this page comes from
- debian bookworm: xmldiff 2.4-2 Β· MIT
- debian trixie: xmldiff 2.6.3-0.2 Β· MIT
- ubuntu jammy: xmldiff 2.4-2 Β· MIT
- ubuntu noble: xmldiff 2.4-3 Β· MIT
- ubuntu resolute: xmldiff 2.6.3-0.2 Β· MIT
- ubuntu stonking: xmldiff 3.0-0.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms