M
Martin Z
I'm using XSD.EXE to generate XSD from my classes. I've worked through
most of the kinks, but there's one thing that is still sending me for a
loop: is there a way to make value-types not "required"? I've got
numerous boolean fields for minor configuration tweaks, and since these
XML files are intended for manual editing, having all those
superfluous booleans be mandatory would be a tedious headache -
especially since the classes they represent are providing defaults
anyways.
I tried using enums, but the problem exists for all value types. I
tried using nullables, but then they'd have to be elements and not
attributes (and these XML files are designed to be convenient to
hand-edit, so the distinction is important). Hand-editing the XSD-file
sounds best, but I'm regenerating them often since I'm still actively
developing the config structure.
Any tips?
most of the kinks, but there's one thing that is still sending me for a
loop: is there a way to make value-types not "required"? I've got
numerous boolean fields for minor configuration tweaks, and since these
XML files are intended for manual editing, having all those
superfluous booleans be mandatory would be a tedious headache -
especially since the classes they represent are providing defaults
anyways.
I tried using enums, but the problem exists for all value types. I
tried using nullables, but then they'd have to be elements and not
attributes (and these XML files are designed to be convenient to
hand-edit, so the distinction is important). Hand-editing the XSD-file
sounds best, but I'm regenerating them often since I'm still actively
developing the config structure.
Any tips?