Skip to content

Commit

Permalink
Y2024
Browse files Browse the repository at this point in the history
  • Loading branch information
vprtsingh committed Jul 27, 2024
1 parent 2a97401 commit 62b6b2a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions packages/xml-to-mongodb-importer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- Splits large XML files into smaller chunks.
- Imports XML data into MongoDB.
- Automatically cleans up temporary files.
- Automatically cleans up chunks files.

## Installation

Expand Down Expand Up @@ -46,15 +46,17 @@ runImporter(params)

### Parameters

- `xmlUrl` (string): The path to your XML file. It must end with `.xml`.
- `openingTag` (string): The opening tag of the XML elements to be split. It must be enclosed in angle brackets, e.g., `<item>`.
- `closingTag` (string): The closing tag of the XML elements to be split. It must be enclosed in angle brackets, e.g., `</item>`.
- `connection` (object): An object containing the MongoDB connection details:
- `mongoURI` (string): The MongoDB connection URI.
- `databaseName` (string): The name of the database.
- `collectionName` (string): The name of the collection.
- `chunkSize` (number, optional): The number of XML elements per chunk. Default is 2500.
| Parameter | Type | Description |
|------------------|----------|-----------------------------------------------------------------------------------------------|
| `xmlUrl` | string | The path to your XML file. It must end with `.xml`. |
| `openingTag` | string | The opening tag of the XML elements to be split, enclosed in angle brackets (e.g., `<item>`). |
| `closingTag` | string | The closing tag of the XML elements to be split, enclosed in angle brackets (e.g., `</item>`). |
| `connection` | object | An object containing MongoDB connection details: |
| `connection.mongoURI` | string | The MongoDB connection URI. |
| `connection.databaseName` | string | The name of the MongoDB database where data will be imported. |
| `connection.collectionName` | string | The name of the MongoDB collection where data will be imported. |
| `chunkSize` | number | (Optional) The number of XML elements per chunk. Default is 2500. |

### Contributing

If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request on [GitHub](https://github.com/mernjs/create-mern-app/issues).
If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request on [GitHub](https://github.com/mernjs/create-mern-app/issues).
2 changes: 1 addition & 1 deletion packages/xml-to-mongodb-importer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xml-to-mongodb-importer",
"version": "1.0.4",
"version": "1.0.5",
"main": "index.js",
"scripts": {
"example": "cd example && yarn dev",
Expand Down

0 comments on commit 62b6b2a

Please sign in to comment.