
Python ParseError Unbound Prefix in XML and How to Fix It
Fix ElementTree ParseError unbound prefix and lxml Namespace prefix is not defined: fragments cut from a document, auto-declared prefixes, recover.
Everything you need to level up your coding skills.

Fix ElementTree ParseError unbound prefix and lxml Namespace prefix is not defined: fragments cut from a document, auto-declared prefixes, recover.

Which characters trigger this scanner error, a tab, at sign, backtick or percent sign, what each looks like in output and the fix that clears it.

Locate an Opening and ending tag mismatch in a 28.6 MB XML file four ways: the parser, per-tag counts, record-by-record parsing and bisection, with timings.

JSON pasted from a web page, a chat or a Word file fails on curly quotes and invisible spaces. How to spot each character and clean the text safely.

What mapping values are not allowed here means, three causes found in real files, an unquoted colon, a stray space and a double value, and the fix for each.

What Content is not allowed in prolog means in Java: a BOM decoded to text, a double BOM, JSON or text instead of XML, and how to diagnose it.

Every JSON parser reports a position in a different way. How to turn a character offset into a line, a column and a caret in Python, Node and jq.

Fix undefined entity and Entity not defined errors in XML from HTML entities like nbsp and eacute: convert to numeric references, a DOCTYPE, or lxml recover.

A YAML debugging guide: the error catalog across three parsers, a worked session through five stacked mistakes, silent failures and tools to prevent them.

JSON needs double quotes, but a Python repr or JavaScript literal uses single quotes. What each parser says, why replacing quotes breaks, and safe fixes.

Fix PCDATA invalid Char value and reference to invalid character number: which characters XML 1.0 forbids, how to strip them from 28 MB in 0.03 s and verify.

Unexpected end of JSON input means the text stopped too soon or was empty. Real messages for every cut point, and how to tell truncated from empty.
We send one email when a new article is published. No spam.