wowdev / WoWDBDefs

Client database definitions for World of Warcraft
Other
254 stars 95 forks source link

code: c#: XML (de)serialization support #39

Closed barncastle closed 6 years ago

barncastle commented 6 years ago

For #29, XML support.

Have added a XML (de)serialization class DBDXMLSerializer. It converts the definition to a proxy class which uses a custom Dictionary<string, ColumnDefinition> for column definition (de)serialization.

Private empty constructors have been added to Build and BuildRange as they are required by XMLSerializer.

Program.cs has been updated to support XML.

The output is near-enough identical to the JSON example barring XML schema requirements. Example output Achievement.zip.

Marlamin commented 6 years ago

Welcome back! Looks awesome. Don't see any issues with merging this as is. @bloerwald?

bloerwald commented 6 years ago

Looks fine to my non# eyes. I’d love having an xsd (and whatever json uses), but that’s probably not a blocker.