I am just trying to make a small, custom unit conversion library. I have all the units and conversion values in an XML file
<unit name="m">
<multiply>1</multiply>
</unit>
<unit name="mm">
<multiply>1E-3</multiply>
</unit>
and, at compile time, I would like to have them converted (wrong word probably) into an enum for other projects to use
public enum Units{m, mm, ...};
Is this possible? Is there a better way to accomplish the same thing?