Ive got a database that is producing xml data
say I have a class like below
then the class will deserialize the Name values correctly, but will not populate the array. As most of the above is boilerplate code from a tool, Im assuming its either my use of attributes, or my XML that is wrong
Thanks
K
say I have a class like below
Code:
public class foo
{
private string _name;
private decimal _data[];
[XmlAttribute("XmlName")]
public string Name
{
get {return _name;]
set {_name = value};
}
[XmlArray ("XmlData")]
public decimal Data{
get {return _data;]
set {_data = value};
}
}
then the class will deserialize the Name values correctly, but will not populate the array. As most of the above is boilerplate code from a tool, Im assuming its either my use of attributes, or my XML that is wrong
Code:
...
<foo XmlName = "bar">
<Data>0.000</Data>
<Data>0.001</Data>
<Data>0.010</Data>
</foo>
Thanks
K