I am parsing a XML file. I have enum:ed some things like this:
In the XML file I later get records like this:Code:enum NeighbourhoodDogs {Felix, Fido, Boo}
Is there a way to use the enum here to put Boos weight in an array somehow, kind of like this:Code:<Dog Name="Boo" Weight="54.30" />
// w is an extracted value from the XML fileCode:dogweights[Boo] = w;
How do I do the mapping from string to enum or do I need to use a hashmap here?