So I am making this class in vb.net. This class will be serialized into a xml.
by using
< XmlElement(“Cookies”)> _
I can name the elements the way I want it to be.
Private i_cookies As Integer
<XmlElement("Cookies")> _
Public Property Cookies() As Integer
Get
Return i_cookies
End Get
Set(ByVal value As Integer)
i_cookies = value
End Set
End Property
The elements are easy to name. But the thing is that i now need to do something to make a sequence containing the elements and complextype containing the sequence and also name them appropriately.
Does anyone know how to do this ?
I keep thinking that I need to put my properties(which are the elements) into something(but I don’t know what) to represent as sequence and the sequence into something that represents as complextype.
Edit: I really have no idea how to formulate my question properly.
Edit(More information requested):
Below is the information on the way i want it to be, but the problem is that, i dont know how to add complextype and the sequence around the element and within the root in my class.
<root>
<complexType name ="ShoppingList">
<sequence>
<element name="cookies"></element>
''More elements/product and such, but this isn't that difficult
</sequence>
</complexType>
<root>
I’m not sure what the exact structure you are trying to model. Here are some examples:
is modeled by
is modeled by
or