Have a collection to serialize.
No problems.
Problem:
How do you define the name of the objects in the collection?
Collection defined with <XmlRootAttribute> (OK)
Objects contained in the collection, I cannot define.
[Serializable(), XmlRoot("ASSETS")]
public class AssetCollection : DataObjectCollection
{
... collection implementation
}
[Serializable()]
public class Asset : DataObjectBase
{
[XmlElement("SERIAL_NUMBER")]
public string SerialNumber
{
...
}
... followed by other properties
}
Serializes to this:
<?xml version="1.0"?>
<ASSETS>
<Asset>
<SERIAL_NUMBER>2UA8110ZZ8</SERIAL_NUMBER>
... other nodes
</Asset>
</ASSETS>
Trying to define Asset as "TBL_ASSET"
Thank you for any assistance.
No problems.
Problem:
How do you define the name of the objects in the collection?
Collection defined with <XmlRootAttribute> (OK)
Objects contained in the collection, I cannot define.
[Serializable(), XmlRoot("ASSETS")]
public class AssetCollection : DataObjectCollection
{
... collection implementation
}
[Serializable()]
public class Asset : DataObjectBase
{
[XmlElement("SERIAL_NUMBER")]
public string SerialNumber
{
...
}
... followed by other properties
}
Serializes to this:
<?xml version="1.0"?>
<ASSETS>
<Asset>
<SERIAL_NUMBER>2UA8110ZZ8</SERIAL_NUMBER>
... other nodes
</Asset>
</ASSETS>
Trying to define Asset as "TBL_ASSET"
Thank you for any assistance.