hn.today

Invisible XML (2025)

xml.com8 points1 comments
Screenshot of Invisible XML (2025)

Invisible XML is a declarative grammar language and toolset for describing the implicit structure of plain-text formats and turning that structure into explicit XML markup. It targets the many ad hoc and convention-driven files people use daily (contact lists, headers, INI files, Markdown, dates, selectors, etc.) and replaces brittle, imperative parsers with readable grammar rules. The approach leverages parsing techniques tolerant of ambiguity and arbitrary lookahead - no longer prohibitively expensive thanks to modern hardware - and includes a concrete iXML syntax (with minor syntax updates as of November 2025). The motivation is practical: a short procedural script that guesses format semantics is hard to maintain, test, or reason about, whereas a declarative description is reusable, verifiable, and easier to validate.

Invisible XML grammars consist of rules that name symbols (nonterminals) and define how they expand into terminals that match input characters. A compact example defines sentence, word, vowel, and consonant rules to accept three-letter words; the parser uses the rules to validate input and to build a parse tree. The parser emits XML where nonterminals map to elements and where the grammar author can control which constructs become elements, attributes, or are elided. The result is automated validation plus structured data extraction from informal text formats without writing imperative extraction code.

Read on xml.com1 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.