Rather than calling getElementValue, I would implement several helper functions like `getNumericValue`, `getStringValue`, `getColorValue`, etc.. which take the `node` and `elementType`, but I would rename `elementType` to `tagName`.  This will make the code calling these functions more readable and also ensures that the correct type of variable is always returned (and it can throw a good error when the wrong data is encountered).