Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elodina/xml-avro
Generate Avro schema and Avro binary from XSD schema and XML
https://github.com/elodina/xml-avro
Last synced: 3 months ago
JSON representation
Generate Avro schema and Avro binary from XSD schema and XML
- Host: GitHub
- URL: https://github.com/elodina/xml-avro
- Owner: elodina
- License: apache-2.0
- Created: 2014-01-22T15:57:59.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-12-05T15:26:11.000Z (about 8 years ago)
- Last Synced: 2024-07-02T14:47:27.982Z (7 months ago)
- Language: Java
- Homepage: http://www.stealth.ly
- Size: 242 KB
- Stars: 66
- Watchers: 16
- Forks: 60
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - xml-avro - Generate Avro schema and Avro binary from XSD schema and XML (Java)
README
# xml-avro
This project provides Converter to convert generic xsd/xml to asvc/avro files.
Avro schema and avro file are generated from xsd schema and xml file.Additionally it includes simple schemaless converter that converts xml to avro and avro to xml.
## Running Project
1. git clone;
2. mvn package;
3. java -jar target/xml-avro*.jar {} {} // converts specified xml+xsd to avro+asvc files
4. java -cp target/xml-avro*.jar ly.stealth.xmlavro.simple.Converter avro // convert xml to avro
5. java -cp target/xml-avro*.jar ly.stealth.xmlavro.simple.Converter xml // convert avro to xml## Schema-based converter
Usage:
```
XML Avro converter.
Usage: "{-d|--debug} {-b|--baseDir } {} {}"
```
## Restrictions
Schema-based converter currently only supports conversion in one direction: from xml to avro.Converter has following restriction:
- xml docs with multiple namespaces are not supported;
- complex type extensions are not supported;## Simple converter
Usage:
```
{avro|xml}
```
Note: simple converter uses predefined general avro schema located at src/ly/stealth/xmlavro/simple/xml.avsc