No activity here so I'll post a reply to myself :P

The only way I have found so far is to write a custom serialization
method (WriteXml). It's ok for small classes or for heavily customized
serializations but it's really annoying on bigger classes that could
otherwise be serialized automatically by using just Attributes. Any
ideas???

Cheers!

On Feb 4, 11:32 am, Nikos Dimitrakopoulos <[email protected]> wrote:
> Hi there everyone!
>
> I'm new to the .NET platform and I have a hard time with a specific
> issue while trying to serialize/deserialize a class that needs to map
> to a pre-defined xml schema. What I haven't yet manage to do is the
> following:
>
> Suppose we have the following xml:
>
> <somelement>
>   ...
>   <totalTravelPrice currency="GBP">1</totalTravelPrice>
> </somelement>
>
> I haven't found a way to implement this yet whether I try to
> encapsulate this element into a class or as class members
> (totalTravelPrice and totalTravelPriceCurrency for example).
>
> Any ideas / help for the newbie? :)

Reply via email to