* @param params
* @return the nodelist with the data
*/
public static NodeList newInstances(Document doc, String[][] params) {
HelperNodeList nl = new HelperNodeList();
nl.appendChild(doc.createTextNode("\n"));
for (int i = 0; i < params.length; i++) {
String type = params[i][0];
String xpath = params[i][1];
if (!(type.equals(XPath2FilterContainer
._ATT_FILTER_VALUE_INTERSECT) || type
.equals(XPath2FilterContainer
._ATT_FILTER_VALUE_SUBTRACT) || type
.equals(XPath2FilterContainer
._ATT_FILTER_VALUE_UNION))) {
throw new IllegalArgumentException("The type(" + i + ")=\"" + type
+ "\" is illegal");
}
XPath2FilterContainer c = new XPath2FilterContainer(doc, xpath, type);
nl.appendChild(c.getElement());
nl.appendChild(doc.createTextNode("\n"));
}
return nl;
}