public Whitelist parser(WhitelistRule whitelistRule) {

		List<AttributeGroup> list = whitelistRule.getAttributeGroups();
		Map<String, List<String>> attributeGroupMap = new HashMap<String, List<String>>(list.size());
		for (AttributeGroup group : list) {
			attributeGroupMap.put(group.getName(), group.getAttributes());
		}

		for (Tag tag : whitelistRule.getTags()) {
			if (tag.isDisabled()) {
				continue;
			}

			List<Attribute> attributes = tag.getAttributes();
			for (Attribute attr : attributes) {
				String attrName = attr.getName();
				if (Character.isUpperCase(attrName.charAt(0)) == true) {
					List<String> attributeGroup = attributeGroupMap.get(attrName);
					for (String attrGroup : attributeGroup) {
						addWhitelist(tag.getName(), attrGroup, attr.getEnforced(), attr.getProtocols());
					}
				} else {
					addWhitelist(tag.getName(), attrName, attr.getEnforced(), attr.getProtocols());
				}
			}
		}

		return whitelist;
	}