opaxmlindent(8)

✨ NAME ✨

opaxmlindent β€” bestie this is the (Linux) glow-up tool for your XML πŸŽ€

So like, you feed it XML that's well-formed (that part is non-negotiable, she's not a miracle worker πŸ’…), and she:

  • filters out all the comments (bye πŸ‘‹)
  • spits out an equivalent XML file that's uniformly indented ✨

Basically she's your reformatting bestie. Use opaxmlindent when you wanna reformat files so they're easier to read and review, and also when you wanna reformat a file so it's easy to compare with diff. No cap, that's the whole vibe check. πŸ¦‹


🌸 Syntax 🌸

opaxmlindent [-t|-k] [-i  indent] [ input_file]

Yes queen, that's the whole incantation. πŸͺ„


πŸ’– Options πŸ’–

  • --help β€” she spills the full help text. All the tea, no filter. β˜•
  • -t β€” trims the leading and trailing whitespace in tag contents. Snip snip, clean edges, periodt. βœ‚οΈ
  • -k β€” for tags that are purely whitespace and contain newlines, this keeps those newlines exactly as-is. The default behavior is to format it as an empty list instead. So like, -k says "leave my newlines alone bestie" πŸ₯Ί
  • -i indent β€” sets how much indentation gets used per level. Default is 4. Cute, cozy, four spaces of personal space. 🫢
  • input_file β€” the XML file to read. Default is stdin, so if you don't name a file she'll just read whatever you pipe at her. πŸ’œ

🌈 Heads up babes: the input has to be well-formed XML or this whole thing falls apart. Also remember comments get filtered out β€” so if you had important notes in there, they're gone, no take-backs, main character exit. πŸ’€

Copyright(C) 2015-2019 Intel Corporation β€” ok that's the legal bit, gotta respect it. πŸ’…

And that's the page, bestie! This was opaxmlindent(8) from the IFSFFCLIRG (Man Page) collection β€” go forth and make your XML pretty. Slay, reformat, repeat. πŸ‘‘βœ¨πŸŽ€