https://github.com/hendrixfan/ubl2cii
A Ruby Gem to convert UBL XML files to CII XML files.
https://github.com/hendrixfan/ubl2cii
cii e-invoice ubl zugferd
Last synced: 3 months ago
JSON representation
A Ruby Gem to convert UBL XML files to CII XML files.
- Host: GitHub
- URL: https://github.com/hendrixfan/ubl2cii
- Owner: hendrixfan
- License: mit
- Created: 2025-03-30T08:56:43.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-05-26T13:37:45.000Z (4 months ago)
- Last Synced: 2025-06-24T21:26:26.842Z (3 months ago)
- Topics: cii, e-invoice, ubl, zugferd
- Language: Ruby
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UblToCiiConverter
A Ruby Gem to convert UBL XML files to CII XML files.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'ubl2cii'
```And then execute:
```bash
$ bundle install
```Or install it yourself as:
```bash
$ gem install ubl2cii
```## Usage
### Basic Usage Example
Here is a simple example of converting a UBL XML file to a CII XML file using the `Ubl2Cii::Converter` class.
```ruby
require 'ubl2cii'# Read the UBL XML file
ubl_xml = File.read('path/to/ubl_invoice.xml')# Initialize the converter
converter = Ubl2Cii::Converter.new(ubl_xml)# Convert to CII XML
cii_xml = converter.convert_to_cii# Output the resulting CII XML
File.write('path/to/cii_invoice.xml', cii_xml)
```## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Dependencies
This project depends on the following gems:
- `nokogiri` (>= 1.18)
## Running Tests
To run the tests, execute:
```bash
$ bundle exec rake spec
```