Skip to content

EbubekirErden/xml-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XML Parser Desktop Application

Java UI

A Java Swing desktop application for converting XML voucher data into Excel (.xlsx) or CSV files. The project combines a simple desktop interface with a streaming parser designed to handle larger files more safely and with clearer user feedback.

Overview

The application is built for users who need to load XML files, process them into tabular output, and manage both source and generated files from a single interface. It supports:

  • XML to Excel conversion
  • Optional XML to CSV export
  • Progress feedback with cancellation support
  • Basic validation with rejected-row reporting
  • File management actions for input and output files
  • Light and dark UI themes

Key Capabilities

Conversion workflow

  • Parses XML voucher and transaction data into a flat tabular structure
  • Creates output files with automatic _out naming by default
  • Supports saving results either beside the source XML file or in a user-selected output folder
  • Writes Excel output using Apache POI streaming APIs for better handling of larger datasets

Validation and processing behavior

  • Detects empty rows and selected invalid field values during processing
  • Separates rejected records into a dedicated Rejected worksheet in Excel output
  • Attempts to interpret date and numeric fields during export
  • Uses cancellation-aware processing and cleanup to avoid leaving partial artifacts behind

Desktop interface

  • Dual-list layout for input files and generated output files
  • Context menus for common file operations
  • Double-click to open files in the default system application
  • Delete key shortcut for removing selected files
  • Optional detailed file view with size, timestamp, and type information
  • Status and progress dialogs for long-running operations

Technology Stack

  • Java 8+
  • Java Swing
  • StAX (javax.xml.stream) for XML parsing
  • Apache POI for Excel generation

Project Structure

xml-app/
├── XmlAppGUI.java        Main Swing application
├── XmlParser.java        XML parsing and export logic
├── build.bat             Windows build script
├── MANIFEST.MF           JAR manifest
├── lib/                  Project dependencies
├── dist/                 Distribution output
└── README.md

Prerequisites

  • Java 8 or later
  • Windows if you want to use the included build.bat script as-is

Build and Run

Build from source

The repository includes a Windows batch script that compiles the project and prepares the distribution package.

build.bat

After a successful build, the packaged application is available in dist/.

Run the packaged application

cd dist
java -jar xml-parser.jar

The dist/ directory also includes the required runtime libraries and a Windows launcher script.

Output

Depending on the selected option, the application generates:

  • Excel output: .xlsx
  • CSV output: .csv

Default output filenames follow this pattern:

original-file.xml -> original-file_out.xlsx
original-file.xml -> original-file_out.csv

Dependencies

The project ships its required libraries in the lib/ directory, including Apache POI and related support libraries.

Notes

  • The included build script references a local JDK path on Windows: C:\Program Files\Java\jdk-1.8\bin.
  • If Java is installed in a different location, update build.bat before building.
  • The current implementation is tailored to voucher-style XML structures containing GL_VOUCHER, TRANSACTIONS, and TRANSACTION elements.

License

No license file is currently included in this repository. Add one if you plan to distribute or open-source the project formally.

About

Java Swing desktop tool for converting XML-style data files into XLSX/CSV with validation and file management.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors