optimize export and add xsd parameter
first working version with xsd (no field check atm, only structure)