private int getElementsByTagLength(String fathertagName, String tagName,
			Element root) {
		int result = 0;
		if (root == null) {
			return 0;
		}
		NodeList fnodes = root.getElementsByTagName(fathertagName);
		if (fnodes == null || fnodes.getLength() == 0) {
			return 0;
		}
		NodeList nodes = ((Element) fnodes.item(0))
				.getElementsByTagName(tagName);
		if (nodes == null || nodes.getLength() == 0)
			return 0;
		result = nodes.getLength();
		return result;
	}