/** * @param sElement * @param element * @return A set of elements that are first-level children of * <code>element</code>, that violate max occurence rules defined by * <code>sElement</code>. */ public static HashSet<ElementOccurrenceResult> findMaxOccurenceViolations(ISchemaElement sElement, Element element) { // Calculate the number of occurrences of each XML tag name // in the node's direct children HashMap<String, Integer> tagNameMap = countXMLChildrenByTagName(element); return processChildrenMax(sElement, tagNameMap, element); }
/** * @param sElement * @param element * @return A set of elements that are first-level children of * <code>element</code>, that violate min occurence rules defined by * <code>sElement</code>. */ public static HashSet<ElementOccurrenceResult> findMinOccurenceViolations(ISchemaElement sElement, Element element) { // Calculate the number of occurrences of each XML tag name // in the node's direct children HashMap<String, Integer> tagNameMap = countXMLChildrenByTagName(element); return processChildrenMin(sElement, tagNameMap); }
/** * @param sElement * @param element * @return A set of elements that are first-level children of * <code>element</code>, that violate max occurence rules defined by * <code>sElement</code>. */ public static HashSet findMaxOccurenceViolations(ISchemaElement sElement, Element element) { // Calculate the number of occurrences of each XML tag name // in the node's direct children HashMap tagNameMap = countXMLChildrenByTagName(element); return processChildrenMax(sElement, tagNameMap, element); }
/** * @param sElement * @param element * @return A set of elements that are first-level children of * <code>element</code>, that violate min occurence rules defined by * <code>sElement</code>. */ public static HashSet findMinOccurenceViolations(ISchemaElement sElement, Element element) { // Calculate the number of occurrences of each XML tag name // in the node's direct children HashMap tagNameMap = countXMLChildrenByTagName(element); return processChildrenMin(sElement, tagNameMap); }