Groups | Blog | Home
all groups > dotnet xml > august 2003 >

dotnet xml : Serialisation > construct objects


Christoph Schittko [MVP]
8/14/2003 8:26:26 AM
you need two classes to serialize the content of car, vehicule cannot be a
string since it has XML content. For example:

<XmlRoot("vehicule")>
Public Class
Public Name as VehiculeData
EndClass

Public Class VehiculeData
<XmlAttribute> Public datatype as String
<XmlText> Public Description As String
End Class

HTH,
Christoph Schittko
Software Architect, .NET Mentor
MS MVP XML .NET
[quoted text, click to view]

lobrys
8/14/2003 11:25:17 AM
Hi everybody

what are the objets for the folowing XML serialisation :
(I have problem with "name" and "datatype")

<vehicule type="car">
<name datatype="String">Megane</name>
</inventory>

I Have this :

class vehicule
<xmlattributeattribute()> public type as string
public name as string
end class

But where do I put 'datatype' for "name'????

Thanks a lot

Lobrys

lobrys
8/18/2003 10:09:46 AM
Thanks a lot for the reply
It was exactly what i was looking for...










"Christoph Schittko [MVP]" <christophdotnetINVALID@austin.rr.com> a écrit
dans le message de news:e5guyemYDHA.1492@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button