fiznool / body-parser-xml

XML parser middleware for express.js.
MIT License
37 stars 10 forks source link

Integrate .xml method to express directly. #161

Open greg-md opened 1 year ago

greg-md commented 1 year ago

With latest versions of express, body-parser is integrated in the express itself and provides the same middleware (Docs: https://expressjs.com/en/api.html#express.json). It would be good to use Express middleware directly for xml as well, instead of body-parser.

Example:

const express = require('express');
require('body-parser-xml')(express);

const app = express();
app.use(express.xml());
fiznool commented 1 year ago

Sounds good. PRs welcome! 🙂