xml2mongo imports any XML feed and save its objects to a MongoDB. xml2mongo is built as middleware for express.
- Parse any XML feeds
- Map feed fields to MongoDB fields
- Save records in MongoDB
- Fully customizable
npm install xml2mongo --save
Add the module to your Express app, configure the module, and use as middleware:
var xml2mongo = ;var config =db: 'mongodb://localhost/xml2mongo' // name of dbschema: 'Import' // name of import schemamodel: company: String url: String description: String title: String updatedAt: String // model of import schema;var feed =url: ''mapping: source: 'entries[i].author.name' target: 'company' source: 'entries[i].id' target: 'url';router;// the next middleware has req.records availablerouter
You are not granted rights or licenses to the trademarks of Oceanhouse21 GmbH, including without limitation the xml2mongo name.