re:
!> except that our customer controls the schema, and it can change fairly regularly.
!> Which would mean modifying the class file every time
I'd hate to work as a programmer in a place where that happens "fairly regularly".
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
======================================
"Larry Bud" <(E-Mail Removed)> wrote in message
news:b089fdff-b7dd-4a05-8eef-(E-Mail Removed)...
On Mar 17, 3:25 pm, "George Ter-Saakov" <gt-...@cardone.com> wrote:
> So? You use XSD only once are not you?
> Just go and modify the source files it had generated after.
>
> George.
>
> "Larry Bud" <larrybud2...@yahoo.com> wrote in message
>
> news:2788c124-5aaa-4946-be77-(E-Mail Removed)...
> On Mar 17, 9:52 am, "George Ter-Saakov" <gt-...@cardone.com> wrote:
>
>
>
>
>
> > Just make your default as empty string.
>
> > Example
>
> > class clsMyClass
> > {
> > public string Id="";
>
> > }
>
> > then when desirializing it with XML Serializer the field will be set to ""
> > (Basically left untouched)
>
> > George.
>
> > "Larry Bud" <larrybud2...@yahoo.com> wrote in message
>
> >news:fe50ec68-5aa1-4d8f-8145-(E-Mail Removed)...
>
> > > Using XML serializer, if an XML field is missing, then the value in
> > > the object is Nothing.
>
> > > Is there a slick way of converting a "Nothing" to an empty string
> > > without doing is
>
> > > if x is nothing then...
>
> The only problem with that is that the class file is being generated
> by the XSD.EXE tool, from a very large schema (over 30 tables)- Hide quoted text -
That's true, except that our customer controls the schema, and it can
change fairly regularly. Which would mean modifying the class file
every time.