Hi,
I am trying to DeSerialize this XML file with DataContracts.
- string xmlData = @"<?xml version='1.0' encoding='utf-8' standalone='yes'?>
- <objects ResultsRemaining='0'>
- <object><id>CF7E7B22-1D3A-4CFE-91F9-F8C5C2DB4069</id>
- <parentid>ED98C97F-A202-48ED-AEEA-34362508A30B</parentid>
- <name>NorthernLights</name>
- <type>file</type>
- <dateadded>1614924419</dateadded>
- <permissions>
- <read />
- <write />
- <saveanno />
- <publishanno />
- <viewrmeta />
- <viewmacro />
- <viewlabel />
- <copyexport />
- <share />
- <downloadslide />
- </permissions>
- <content>
- <file>
- <filepath>68934805-fa78-4d84-aac1-fbcde4a7a8f2.png</filepath>
- <mime>image/png</mime>
- </file>
- </content>
- </object>
- </objects>";
I have created this structure with classes:
Objects -- Object -- Permission
Content --- File
I have no errors when I DeSerialize the XML data but no objects will be created.
My code is as follow;
- Objects objects = new Objects();
- objects = dataCSUtility.DeSerializer<Objects>(xmlData);
Nothing will be assigned to objects!
Can anybody solve this?