I have some trouble building a good algorithm. Here is my criteria: I am reading a field in an xml file as a string and trying to interpret it in order to activate some gui component. More specifically, the field i read in as a string is a “Allowed Characters” field and the gui components are checkboxes that activate based on the contents of the field. For example, in the xml i have the tag
<Allowed Field>ABCDEFGHIJKLMNOPQRSTUVWXYZ</Allowed Fields>.
When i read in this field as a string, the program should know that the field content type is ALPHA and check the checkbox named alpha. Likewise if the field had alphanumeric contents or any special characters. I have three checkboxes that the algorithm should interpret: Alpha, alphanumeric and special characters. How can i build the algorithm that interprets the meaning of the string i read from the xml to mean the mentioned field types?
Thanks
The rest depends on what you define as special characters (e.g. what is whitespace? punctuation?).
Charmethods for your reference.