[go: up one dir, main page]

Skip to content

elodina/xml-avro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 <baseDir>} <xsdFile> <xmlFile> {<avscFile>} {<avroFile>}"

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} <inFile> <outFile>

Note: simple converter uses predefined general avro schema located at src/ly/stealth/xmlavro/simple/xml.avsc

About

Generate Avro schema and Avro binary from XSD schema and XML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages