
Using XML Namespaces for Extensions Without the Chaos
Let partners add their own data to your XML format safely by giving each extension its own namespace, with a reader that ignores what it does not own.
Tag
590 posts

Let partners add their own data to your XML format safely by giving each extension its own namespace, with a reader that ignores what it does not own.

Parse $1,234.50, (12.50), 1.234,50 € and 7,00 into exact Decimals, find the cases where stripping symbols is wrong, and spot a column that mixes currencies.

Read password protected Excel files from a script with msoffcrypto-tool, tell file encryption from sheet protection, and keep passwords out of code and logs.

Text and elements side by side look natural in documents and break data models. How ElementTree and lxml expose text and tail, and what to do instead.

What to do when a token lands in a values or config YAML: removing it from the file leaves it in history, gitleaks finds it, and rotation is the real fix.

Store JSON in DynamoDB map and list attributes, update nested paths in place and avoid float, reserved-word and size errors, tested on DynamoDB Local.

Stop zip bombs and oversized xlsx uploads with limits on file size, entry count, expansion ratio and rows, enforced before parsing and sized from real files.

XML cannot hold raw bytes. Base64 adds 33 percent, hex adds 100 percent, and both cost memory. Measured sizes, the schema type, and the alternatives.

Trim padded CSV fields with pandas, the csv module, DuckDB and qsv, and see why strip() misses the zero-width space that still breaks an email match.

Open untrusted Excel files in a sandboxed worker with no network, memory and time limits, a read-only parser and no desktop Excel, then load results as data.

Store JSON in ClickHouse as a String with JSONExtract functions or as the native JSON type, with size and speed measured on 200,000 documents.

A cleaning pipeline that never edits the raw file, counts rows at every step and keeps rejects: 200,000 rows in 3.85 s, identical output twice.