For a project I once created a web service which generates xml files, for each xml file I created a class, like this:
- public class Tsjoeketjoek
- {
- [XmlAttribute]
- public string Num;
-
- [XmlAttribute]
- public string Type;
-
- [XmlAttribute]
- public string Car;
-
- [XmlAttribute]
- public string Deel;
-
- [XmlAttribute]
- public string Resa;
-
- [XmlAttribute]
- public string Prest;
-
- public FootNote FootNote;
-
- public List<Station> Rit;
- }
For comptability reasons the tag names need to be uppercase.
Now I know I can enforce the tagnames in the code itself, by actually naming each field, I am wondering if there is no better method. There a lot of classes I would have to do this manual change for..
For example, can't I write an extension for XmlSerializer so I can enforce uppercase tagnames that way?