Koa XML Body Parser Middleware

JSON →
library 3.0.0 ·javascript maintenance
verified May 27, 2026

koa-xml-body is a Koa middleware designed to parse XML request bodies, making the parsed data available on `ctx.request.body`. The current stable version is 3.0.0, published approximately 3 years ago, which is compatible with Koa 2.x and 3.x, while Koa 1.x users should opt for `koa-xml-body@1.x`. It internally uses `xml2js` for the actual XML parsing, exposing its configuration options via the `xmlOptions` property. Key differentiators include its explicit focus on XML content types (e.g., `application/xml`, `text/xml`), robust error handling customization through an `onerror` callback, and seamless integration with other body parsers by carefully managing `ctx.request.body`. Its release cadence is generally tied to bug fixes or Koa compatibility updates rather than rapid feature additions, suggesting a maintenance-oriented status.

total hits 58
actors 8 distinct systems
last hit 1d ago human
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
Search engines
2
Humans
23

top countries 🇺🇸 United States · 🇨🇦 Canada · VN · 🇩🇪 Germany · 🇳🇴 Norway