[xsd-users] Serializing ...
Jason Wang
jwang at saic-asd.com
Mon Oct 2 10:50:37 EDT 2006
Hi,
I am new to XSD and I like it very much so far.
I had some minor issues on serializing to ostream (and the
operator<<(...)). I am not sure if it is by design or is it a bug. But
when streaming, it crashes when a required element is not set (or null).
I guess it is by design. If so, I wonder if there is way to relax
this condition by set some parameters at code generation or at run time.
I personally feel a warning message is more user friendly than
crashing the code if a required element is not set.
Also in order to stream, one needs to set the following lines first:
xml_schema::namespace_infomap map;
map["pos"].name = "...";
map["pos"].schema = "...";
It would be more user friendly to me if a default value is provided.
After all those info is readily available at code generation.
Thanks,
Jason
More information about the xsd-users
mailing list