A lightweight C# console utility to convert XML and TSV data files into SQLite (DB3) databases. No predefined schema required—the tool generates tables and columns on the fly based on your data structure.
- Dynamic Schema Generation: Automatically creates SQLite tables from XML tags or TSV headers.
- XML Flattening: Handles nested XML structures by flattening them into a relational format (e.g.,
Parent_Child). - Interactive CLI: Simple step-by-step terminal interface with a real-time progress bar.
- Safe Input: Automatically cleans file paths and handles special characters in data.
- Language: C# (.NET 10.0)
- Database: System.Data.SQLite
- ORM: Dapper
- XML Parsing: System.Xml.Linq (XDocument)
This project uses the following NuGet packages:
- Dapper (v2.1.35+)
- System.Data.SQLite (v1.0.118+) - SQLite database engine with the ADO.NET provider.
- Select Format: Launch the application and choose 1 for XML or 2 for TSV.
- Source Path: Enter the full path to your source file (e.g.,
C:\data\input.xml). - Output Path: Enter the destination path for the
.db3file (include the extension). - TSV Options: If using TSV, specify if the file contains a header row (y/n).
- Process: The tool will display a progress bar. Once finished, the database is ready!
Note: You have to type the suffix
Input:
<entry>
<word>Apple</word>
<category>Fruit</category>
</entry>| Id | word | category |
|---|---|---|
| 1 | Apple | Fruit |
- Clone the repository:
git clone https://github.com/Zero89-sys/XML-TSV-Converter.git cd XML, TSV-Converter