I have these classes:
But everytime i serialize CHardwareList, the file ALWAYS looks like this:
Whatever i try there is nothing to be found in the file but this. Is there any solution to this?
Code:
public class CHardware
{
[XmlElement("HardwareID")]
public int HardwareID;
[XmlElement("HardwareName")]
public string HardwareName;
[XmlElement("HardwareType")]
public string HardwareType;
[XmlElement("HardwareCost")]
public int HardwareCost;
[XmlElement("Params")]
public HybridDictionary Params;
public CHardware()
{
Params = new HybridDictionary();
}
}
[XmlRoot("HardwareList")]
public class CHardwareList
{
[XmlArray("Hardwares")]
[XmlArrayItem("Hardware", typeof(CHardware))]
CHardware[] HardwareList;
[XmlElement("Length")]
int Length;
public CHardwareList()
{
HardwareList = new CHardware[128];
Length = 0;
}
// ... Functions ...
}
But everytime i serialize CHardwareList, the file ALWAYS looks like this:
Code:
<?xml version="1.0"?>
<HardwareList xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] />
Whatever i try there is nothing to be found in the file but this. Is there any solution to this?