hello you all developers!
I’ve written a C# class (.cs) file which represents the XRNI structure.
It was way more easy than I thought (I’ve started this morning, and it took about 5 hours to complete), because I’ve used a class generator which has written most of the boring stuff out of the XSD schema file.
the whole class code can be downloaded here
HOW IT WORKS:
the file RenoiseInstrument2.cs contains the representation class, which has a property for each element of the XRNI structure.
This class can directly load the Instrument.XML file which is into the XRNI file, but does not take care of decompressing the XRNI file to extract the XML file.
In order to decompress the XRNI file and obtain the XML, you can use #ziplib which has also been used in the simple code sample, which basically can load an XRNI file and shows its screen name in the textbox.
Other than the properties, the Instrument class has two methods: FromXml, and ToXml, which let you read/write the instrument from/to an XML file.
Check the sample code because I think it is really self-explanatory.
Thanks to taktik for opening the format!