code: static <E extends Enum<E>> E readEnum(Node node, Class<E> enumClass)
      {
          if (node == null)
          {
              throw new XmlException(
                  "Tried to read "+enumClass.getSimpleName()+
                  " value from null node");
          }
          String value = node.getFirstChild().getNodeValue();
          if (value == null)
          {
              throw new XmlException(
                  "Tried to read "+enumClass.getSimpleName()+
                  " value from null value");
          }
          try
          {
              return Enum.valueOf(enumClass, value);
          }
          catch (IllegalArgumentException e)
          {
              throw new XmlException(
                  "No valid "+enumClass.getSimpleName()+
                  ": \""+value+"\"");
          }
      }
docs: Parse an enum value from the first child of the given node.
  
  @param <E> The enum type
  
  @param node The node
  @param enumClass The enum class
  @return The enum value
  @throws XmlException If the given node was <code>null</code>, or no
  enum value could be parsed