By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,738 Members | 1,682 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,738 IT Pros & Developers. It's quick & easy.

Question about serializing...

P: n/a
I've currently got a database structure which is something like:-

class a
- member type
- effective date

and:-

class b
- client name
What I really want to do is to serialize as:-
<classb>
<effectivedate>date</effectivedate>
<clientname>clientname</clientname>
</classb>

Is there a way to split the serializing in this way that the child
rather than the parent does the serializing?

Thanks
Jan 29 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Maybe if you subscribe to the UnknownElement event of your serializer, you
can assign EffectiveDate to ClassBInstance.Parent.EffectiveDate. Just be
careful not to subclass classb from classa or reimplement
membertype/effectivedate in classb; if you were to do that, you'd have to go
the XAML route for noting the parent by qualifying like:
<Grid>
<Button Grid.Column="0"/>
</Grid>

so that your new functionality doesn't see any ambiguities
Jan 29 '07 #2

P: n/a
Keith Patrick wrote:
Maybe if you subscribe to the UnknownElement event of your serializer, you
can assign EffectiveDate to ClassBInstance.Parent.EffectiveDate. Just be
careful not to subclass classb from classa or reimplement
membertype/effectivedate in classb; if you were to do that, you'd have to go
the XAML route for noting the parent by qualifying like:
<Grid>
<Button Grid.Column="0"/>
</Grid>

so that your new functionality doesn't see any ambiguities

Thanks Keith,

Any idea how to do it on serializing as well as deserializing?
Jan 30 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.