
Handy Command Line Tools for XML Work in Daily Practice
The command-line tools that cover daily XML work: xmllint, xmlstarlet, xsltproc, xq and yq, with tested commands, timings, exit codes and the traps of each.
Everything you need to level up your coding skills.

The command-line tools that cover daily XML work: xmllint, xmlstarlet, xsltproc, xq and yq, with tested commands, timings, exit codes and the traps of each.

What survives when YAML becomes JSON, CSV, XML or Excel and back, with a tested loss matrix, the type traps in each direction and a conversion checklist.

User text put into XML by string formatting can add elements and attributes. See the injection, the escaping that stops it, CDATA, bad characters and names.

Where lxml and ElementTree stop on deep nesting, long text nodes and wide documents, what a tree costs in memory, and the limits to set for uploads.

Signature wrapping moves a signed element so the signature verifies while the app reads another. A toy HMAC example shows the gap and the fix.

Parse untrusted XML in PHP 8.5 and Node 24: why LIBXML_NOENT is the dangerous flag, what DOMDocument does, and how two Node parsers behave.

Parser settings that stop XXE in Java and Python, tested on one file: which Java features block it, what each error says, and the lxml options.

A 547-byte file that expands to 30 million characters. How lxml, ElementTree and Java refused it, what the limits are, and the settings that keep them on.

An XXE attack makes a parser read a file or fetch a URL the sender names. Run on five parsers, three leaked a local file by default or with one flag.

The XML attacks that matter for web services and loaders, how six parsers behave, one parse function with limits, and the tests that keep it closed.

A docx or xlsx is a zip of XML files. Open it with zipfile, read the paragraphs, runs and tables of a docx and the shared strings and cells of an xlsx.

A reference to the XML formats you meet in practice: how to recognize each by root and namespace, what to extract, and the trap each one carries.
We send one email when a new article is published. No spam.