XSD.exe utility insights
hi,
i used xsd utility in .net framework 2.0 on dll, has following objects.
class a
{
string name;
string id;
}
class b : a
{
int age;
int year;
}
class c: a
{
int month;
}
, on..
now, when create xsd, includes class base object in both class b , class c, not, want. there way create xsd, members
of class included in class b , class c ?
secondly, couldn't figure out logic behind "minoccurs" , "maxooccurs" numbers generated in xsd file.
thanks,
-brajesh
i used xsd utility in .net framework 2.0 on dll, has following objects.
class a
{
string name;
string id;
}
class b : a
{
int age;
int year;
}
class c: a
{
int month;
}
, on..
now, when create xsd, includes class base object in both class b , class c, not, want. there way create xsd, members
of class included in class b , class c ?
secondly, couldn't figure out logic behind "minoccurs" , "maxooccurs" numbers generated in xsd file.
thanks,
-brajesh
hi,
- xsd.exe designed preserve class hierarchy in xsd can't turn off other remove class hierarchy in code.
- iirc, value types (which cannot null in .net) have minoccurs="1" , reference types (which can null) have minoccurs="0". means when string values null, elements won't written @ all. maxoccurs="1" unless type array or collection in case maxoccurs="unbounded".
hope helps
alex
Archived Forums A-B > ASMX Web Services and XML Serialization
Comments
Post a Comment