Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vikrantdeshpande09876/xml_to_csv_rep
A Flask app with an easy-to-use frontend that's intended for generating a configuration excel, given an input XML/XSD file (ie- Extensible Markup format to Relational schema)
https://github.com/vikrantdeshpande09876/xml_to_csv_rep
csv flask html-css-javascript javascript python xml
Last synced: 3 days ago
JSON representation
A Flask app with an easy-to-use frontend that's intended for generating a configuration excel, given an input XML/XSD file (ie- Extensible Markup format to Relational schema)
- Host: GitHub
- URL: https://github.com/vikrantdeshpande09876/xml_to_csv_rep
- Owner: vikrantdeshpande09876
- Created: 2020-02-02T08:16:05.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T21:26:03.000Z (over 1 year ago)
- Last Synced: 2024-11-08T07:47:21.781Z (about 2 months ago)
- Topics: csv, flask, html-css-javascript, javascript, python, xml
- Language: Python
- Homepage: https://xmlxsdparser.herokuapp.com/home
- Size: 47.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# XML/XSD Parser
This Flask app with an easy-to-use frontend is intended for generating a configuration excel, given an input XML/XSD file (Extensible Markup format to Relational schema).**_This module was used as a proof-of-concept for an internal use-case._**
## Overview
- This Flask Application is live on Heroku for demonstration purposes.
- After logging in, one must upload an XML/XSD File, select a file-format, a destination data delimiter (default: comma), and a filename for the final config file (default: original filename with timestamp).
- The hierarchy of parsed XML/XSD selectable tags is displayed and one needs to choose a section of these tag(s), and define the Primary key tag, Primary child tag, and Primary parent tag.
The config file will mainly contain a hierarchy of nested-tags of your XML/XSD file (with associated metadata for the downstream Pyspark application) as:
- Parent1
- Parent1.child1
- Parent1.child2
- Parent1.child2.subchild1
- Parent1.child2.subchild2
- Finally, the config excel file for the parsed XML/XSD Tags is created at server side, so that the Spark-Scala code can access and read the XML files from Unix directory.
![process_flow](/Application%20Metadata/Process_flow_flask_app.jpg?raw=True)
## Step-by-step guide to setup the XML/XSD Parser
1. Install GIT (This repository used 2.25.1 on Windows10): [Git](https://git-scm.com/downloads)
2. Install Python (This application was built on 3.8.1): [Python](https://www.python.org/downloads/)
3. Clone the current repository: [XML/XSD to CSV](https://github.com/vikrantdeshpande09876/XML_to_CSV_Rep)
4. Navigate to the directory for this repo, and create a virtual environment for making a copy of your system-wide Python interpreter:
```
> python -m venv myvirtualenv
```5. Activate this virtual environment. You need not perform step#4 each time for execution:
```
> myvirtualenv\Scripts\activate
```6. Install the application by executing:
```
> pip install -e .
```7. Set the starting point for running this Flask application as the package where our application 'xml_to_csv' lives:
```
> set flask_app=xml_to_csv
> set flask_env=development
```8. Execute the application from any directory on your system:
```
> flask run
```9. In a web-browser, navigate to the URL mentioned in the cmd output from above command. For example http://127.0.0.1:5000/ or http://localhost:5000/. App is currently live on [Heroku](https://xmlxsdparser.herokuapp.com/) to view.
10. Currently the application accepts (username, password) from the excel file Login_creds.xlsx for logging in. This file is located in the /xml_to_csv/static/ folder of the application. These static login-credentials were used for quick development of a Minimal Viable Product.