Hi All,
Im having a problem serializing an xml document
My document is structured like this:
<recentActivity>
<add>
<file>
<displayName>Logon.aspx</displayName>
<ref>https://........</ref>
<size>336</size>
<lastModified>2012-05-25T04:40:57.000-07:00</lastModified>
<mediaType>application/octet-stream</mediaType>
<presentOnServer>true</presentOnServer>
<fileData>https://..........</fileData>
</file>
</add>
<edit>
<file>
<displayName>somefile.suo</displayName>
<ref>https://...........</ref>
<size>83968</size>
<lastModified>2012-05-25T04:34:51.000-07:00</lastModified>
<mediaType>application/octet-stream</mediaType>
<presentOnServer>true</presentOnServer>
<fileData>https://...........</fileData>
</file>
</edit>
</recentActivity>
As you can see, the "file" elements parent can be either "add" or "edit"
Here are my class objects
<XmlRoot("recentActivity")>
Public Class RecentActivities
<XmlElement("edit"), XmlElement("add")> Public Property Items As ObjectModel.Collection(Of Activity)
End Class
Public Class Activity
<"I need help here"> Public Property Action As String
<XmlElement("file")> Public Property Details As FileDetails
End Class
In the code block above i need the "Action" property to be the name of the files parent element "add" or "edit"
How do i do it in one list? is it even possible?
i toyed with 2 lists, one for add and one for edit, but the output is in a specific order thats not always related to the lastmodified element of a file
Thanks in Advance