Batch import XML files to MongoDB collections

by

Want to batch import data from XML files to MongoDB collections?

Using FileToMongo, you can bulk import data from XML files to MongoDB collections easily and fast, no need to program, just a few mouse clicks!

Support all MongoDB deployment types: standalone, replica set, sharded cluster, and MongoDB Atlas.

Support Windows, Linux, macOS.

Here’s how to.

Import

Please download and install FileToMongo, then run it.

Click “N File To N Collection” at task dialog.

Batch Import XML files data To MongoDB collections - task window

then show the wizard.

Select the “XML” file type.

Batch Import XML files data To MongoDB collections - select file type

1. Open a folder contains XML files.

Batch Import Data From XML Files To MongoDB collections - set XML folder

2. Set XML options.

Batch Import Data From XML Files To MongoDB collections - config XML file

3. List collesions, set “Import Type”.

Batch Load Data From XML File To MongoDB collections - select table

4. Map files to collections.

Batch Load Data From XML File To MongoDB collections - select table

5. Summary.

Batch Transfer Data From XML Files To MongoDB collections - preview

6. Import XML data to MongoDB collections.

Batch Copy Data From XML Files To MongoDB collections - import data

After importing, you can view imported data.

Bulk Import Data From XML Files To MongoDB collections - view data

Save/load session

You can save/load session to run “XML files to MongoDB collections” conversion repeatly.

1.Save Session.

Click “Save Session” button, then enter a session file name.

Bulk Import Data From XML Files To MongoDB collections - save session

click “OK” button.

2.Load Session.

Click the “Open a Saved Session” in task window, select a session file.

Bulk Import Data From XML Files To MongoDB collections - load session

then show the wizard form, click a few “Next” to import XML files to MongoDB collections.

Bulk Import Data From XML Files To MongoDB collections - start session

Run in command line

You can run “XML files to MongoDB collections” conversion in command line.

When you save session, you can click “Save & Make Batch File”.

Bulk Import Data From XML Files To MongoDB collections - save session

The “Save & Make Batch File” form shows.

Bulk Import Data From XML Files To MongoDB collections - create batch file

Click “OK” button, you’ll create a batch file, in Windows, like this:

C:
cd "C:\Users\pansh\AppData\Local\Programs\FileToMongo"
FileToMongo task="C:\Users\pansh\Documents\test.mla" logfile="C:\Users\pansh\Documents\test.log"

You can run this batch file in command line.

Run as scheduled task

You can run “XML files to MongoDB collections” conversion automatically at specific time.

On Linux/macOS, you can use Crontab.

For macOS, How to Fix Cron Permission Issues in macOS.

On Windows, in “Save & Make Batch File” form, you can click “Create & Schedule Task” to set a scheduled task.

Bulk Import Data From XML Files To MongoDB collections - create batch file

And then, with scheduled task wizard, step by step.

Bulk Import Data From XML Files To MongoDB collections - scheduled task application

Bulk Import Data From XML Files To MongoDB collections - scheduled task name

Bulk Import Data From XML Files To MongoDB collections - scheduled task time

Bulk Import Data From XML Files To MongoDB collections - scheduled task user

Bulk Import Data From XML Files To MongoDB collections - scheduled task information

You’ll see created task listed in scheduled task list.

scheduled task list

Download

Here you can download FileToMongo, and buy FileToMongo.

Download FileToMongo Download FileToMongo