Hey Team, I got a XML File, looking familiar to this :
<root>
<carnumber>12</carnumber>
<carcolor>2</carcolor>
<cartype>5</cartype>
</root>
Like you see I got some Elements with values/text in it. The car element for example can take values from 1 to 1000. But the element carcolor can take values from 1 - 5 and the cartype from 1 - 10.
The important thing is that the values of the carcolor and cartype elements mean something. carcolor "2" means red, "1" blue and so on.
So I need to present the user not the values but the real meaning of the values.
I found myself creating some classes that represent the elements with there valid values and things got really complicated and I dont know if this was/is the best way.
A friend of mine suggested me to use XML serialization because my XML file is static. It will never change.
My question is simple. I just wanna know how you would solve this problem. My idea contains classes that represent the XML element, for example cartype within this class I have a Dictonary with a pair. This represent the values within the XML file and the string is the meaning of this value. And I use a lot of Linq to navigate and edit the values.
Thanks again!