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.
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
- Parses XML voucher and transaction data into a flat tabular structure
- Creates output files with automatic
_outnaming 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
- Detects empty rows and selected invalid field values during processing
- Separates rejected records into a dedicated
Rejectedworksheet in Excel output - Attempts to interpret date and numeric fields during export
- Uses cancellation-aware processing and cleanup to avoid leaving partial artifacts behind
- 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
Deletekey shortcut for removing selected files- Optional detailed file view with size, timestamp, and type information
- Status and progress dialogs for long-running operations
- Java 8+
- Java Swing
- StAX (
javax.xml.stream) for XML parsing - Apache POI for Excel generation
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
- Java 8 or later
- Windows if you want to use the included
build.batscript as-is
The repository includes a Windows batch script that compiles the project and prepares the distribution package.
build.batAfter a successful build, the packaged application is available in dist/.
cd dist
java -jar xml-parser.jarThe dist/ directory also includes the required runtime libraries and a Windows launcher script.
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
The project ships its required libraries in the lib/ directory, including Apache POI and related support libraries.
- 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.batbefore building. - The current implementation is tailored to voucher-style XML structures containing
GL_VOUCHER,TRANSACTIONS, andTRANSACTIONelements.
No license file is currently included in this repository. Add one if you plan to distribute or open-source the project formally.