In the following composition please note the serialization attributes are lowercase and the array property in the root is serialized accordingly but its child element are not honoring this decoration.
I spected this:
<engine>
<servos>
<servo>
</servo>
</servos>
</engine>
But instead i get this:
<engine>
<servos>
<Servo> <!-- here is the problem-->
</Servo>
</servos>
</engine>
Code:
[XmlRoot( "engine" )]
public class Engine {
[XmlArray( "servos" )]
public List<Servo> Servos {
get { return servos; }
set { servos = value; }
}
}
[XmlRoot( "servo" )] //Child ignoring lowercase decoration
public class Servo {
}
What is the correct way to serialize as indicated by the attribute?