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 between 0 and 1 that 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