Hi
I am trying to serialize a collection of GUIDs by overriding the
serialize function on a diagram component I am using.
The following code sucessfully serializes a single GUID:
Public Overloads Overrides Function Serialize(ByVal Key As Object) As
String
Dim objXML As New XmlDocument
Dim objParent As XmlElement
objParent = objXML.CreateElement("InteractionShape")
objParent.SetAttribute("InteractionGUID", _
m_InteractionGUID.ToString) <-----change to
collection
objParent.InnerXml = MyBase.Serialize(Key)
Return objParent.OuterXml
End Function
Which gives the following XML: (some XML deleted)
<InteractionShape InteractionGUID="50179760-9d24-4239-8029-0fb08be7630b">
</InteractionShape>
Does anyone know how to serialize a collection (where
m_InteractionGUID is a strongly typed collection of GUIDs rather than
a single GUID) to give something like the following XML?
<InteractionShape>
<InteractionGUID GUID="50179760-9d24-4239-8029-0fb08be7630b">
<InteractionGUID GUID="84611660-9d45-3575-3545-0bb08be5816f">
</InteractionShape>
- OR -
<InteractionShape>
<InteractionGUID>50179760-9d24-4239-8029-0fb08be7630b</InteractionGUID>
<InteractionGUID>84611660-9d45-3575-3545-0bb08be5816f</InteractionGUID>
</InteractionShape>
Kind regards, Carl