本文整理汇总了Java中com.sun.org.apache.xml.internal.security.utils.HelperNodeList类的典型用法代码示例。如果您正苦于以下问题:Java HelperNodeList类的具体用法?Java HelperNodeList怎么用?Java HelperNodeList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HelperNodeList类属于com.sun.org.apache.xml.internal.security.utils包,在下文中一共展示了HelperNodeList类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newInstances
import com.sun.org.apache.xml.internal.security.utils.HelperNodeList; //导入依赖的package包/类
/**
* Method newInstances
*
* @param doc
* @param params
* @return the nodelist with the data
*/
public static NodeList newInstances(Document doc, String[][] params) {
HelperNodeList nl = new HelperNodeList();
XMLUtils.addReturnToElement(doc, nl);
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());
XMLUtils.addReturnToElement(doc, nl);
}
return nl;
}
示例2: newInstances
import com.sun.org.apache.xml.internal.security.utils.HelperNodeList; //导入依赖的package包/类
/**
* Method newInstances
*
* @param doc
* @param params
* @return the nodelist with the data
*/
public static NodeList newInstances(Document doc, String[][] params) {
HelperNodeList nl = new HelperNodeList();
XMLUtils.addReturnToElement(doc, nl);
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());
XMLUtils.addReturnToElement(doc, nl);
}
return nl;
}
示例3: getInstance
import com.sun.org.apache.xml.internal.security.utils.HelperNodeList; //导入依赖的package包/类
/**
* Generates a Transform object that implements the specified
* <code>Transform algorithm</code> URI.
*
* @param algorithmURI <code>Transform algorithm</code> URI representation,
* such as specified in
* <a href=http://www.w3.org/TR/xmldsig-core/#sec-TransformAlg>Transform algorithm </a>
* @param contextChild the child element of <code>Transform</code> element
* @param doc the proxy {@link Document}
* @return <code>{@link Transform}</code> object
* @throws InvalidTransformException
*/
public static Transform getInstance(
Document doc, String algorithmURI, Element contextChild)
throws InvalidTransformException {
HelperNodeList contextNodes = new HelperNodeList();
XMLUtils.addReturnToElement(doc, contextNodes);
contextNodes.appendChild(contextChild);
XMLUtils.addReturnToElement(doc, contextNodes);
return getInstance(doc, algorithmURI, contextNodes);
}