I have the following XML snippet:
<?xml version="1.0" encoding="utf-8"?>
<dmFiles>
<dmFile dmUpFileGuid=""
dmFileDescr="testcase01.pdf"
dmFileMetaType="main"
dmFileGuid=""
dmMimeType="pdf"
dmFormat="">
<dmEncodedContent></dmEncodedContent>
</dmFile>
</dmFiles>
When I try to deserialize it, nothing gets populated, my c# class is defined like this, please help me spot my logic flaw:
[Serializable]
public class dmFiles
{
public dmFile[] dmFile
{
get;
set;
}
}
public class dmFile
{
[XmlAttribute("dmUpFileGuid")]
public string dmUpFileGuid
{
get;
set;
}
[XmlAttribute("dmFileDescr")]
public string dmFileDescr
{
get;
set;
}
[XmlAttribute("dmFileMetaType")]
public string dmFileMetaType
{
get;
set;
}
[XmlAttribute("dmFileGuid")]
public string dmFileGuid
{
get;
set;
}
[XmlAttribute("dmMimeType")]
public string dmMimeType
{
get;
set;
}
[XmlAttribute("dmFormat")]
public string dmFormat
{
get;
set;
}
[XmlElement]
public string dmEncodedContent
{
get;
set;
}
}