public static boolean isNodeOfType(Node node, String tagName, boolean caseSensitive) {
		if (!(node instanceof Element))
			return false;
		Element nodeAsElement = (Element) node;
		if (caseSensitive && nodeAsElement.getTagName().equals(tagName))
			return true;
		if (!caseSensitive && nodeAsElement.getTagName().equalsIgnoreCase(tagName))
			return true;
		return false;
	}