C# Classes Forn Xrni Managing

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!

I want to play around with this, but I’m a C# newbie… I used to do some C coding when I was younger.

Did you use Visual Studio Express for this?

Yes, I used Visual Studio Express, so basically anyone with a Windows environment can use these classes with freeware stuff; I will post a class describing an XRNS file soon.

@it-alien

it seems you missed something, the xrni project is referenced but not included in the zipfile. only the loader example. or maybe i am just blind.

damn… now tell me… how much am I stupid?

please find both projects here.

well… this means that at least one person has tried to download it :rolleyes:

…and just for the heck of it, Linux version of the same project, made using MonoDevelop

hmm c# containe zip libs…