当前位置: 首页>>代码示例>>Java>>正文


Java XMLUtils.selectDsNodes方法代码示例

本文整理汇总了Java中com.sun.org.apache.xml.internal.security.utils.XMLUtils.selectDsNodes方法的典型用法代码示例。如果您正苦于以下问题:Java XMLUtils.selectDsNodes方法的具体用法?Java XMLUtils.selectDsNodes怎么用?Java XMLUtils.selectDsNodes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.org.apache.xml.internal.security.utils.XMLUtils的用法示例。


在下文中一共展示了XMLUtils.selectDsNodes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLength

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Return the nonnegative number of transformations.
 *
 * @return the number of transformations
 */
public int getLength() {
    if (transforms == null) {
        transforms =
            XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform");
    }
    return transforms.length;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:Transforms.java

示例2: item

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Return the <it>i</it><sup>th</sup> <code>{@link Transform}</code>.
 * Valid <code>i</code> values are 0 to <code>{@link #getLength}-1</code>.
 *
 * @param i index of {@link Transform} to return
 * @return the <it>i</it><sup>th</sup> Transform
 * @throws TransformationException
 */
public Transform item(int i) throws TransformationException {
    try {
        if (transforms == null) {
            transforms =
                XMLUtils.selectDsNodes(this.constructionElement.getFirstChild(), "Transform");
        }
        return new Transform(transforms[i], this.baseURI);
    } catch (XMLSecurityException ex) {
        throw new TransformationException("empty", ex);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:Transforms.java

示例3: getLength

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Return the nonnegative number of added SignatureProperty elements.
 *
 * @return the number of SignatureProperty elements
 */
public int getLength() {
    Element[] propertyElems =
        XMLUtils.selectDsNodes(this.constructionElement, Constants._TAG_SIGNATUREPROPERTY);

    return propertyElems.length;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SignatureProperties.java

示例4: engineLookupResolveX509Certificate

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Method engineResolveX509Certificate
 * @inheritDoc
 * @param element
 * @param BaseURI
 * @param storage
 *
 * @throws KeyResolverException
 */
public X509Certificate engineLookupResolveX509Certificate(
    Element element, String BaseURI, StorageResolver storage
) throws KeyResolverException {

    try {
        Element[] els =
            XMLUtils.selectDsNodes(element.getFirstChild(), Constants._TAG_X509CERTIFICATE);
        if ((els == null) || (els.length == 0)) {
            Element el =
                XMLUtils.selectDsNode(element.getFirstChild(), Constants._TAG_X509DATA, 0);
            if (el != null) {
                return engineLookupResolveX509Certificate(el, BaseURI, storage);
            }
            return null;
        }

        // populate Object array
        for (int i = 0; i < els.length; i++) {
            XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], BaseURI);
            X509Certificate cert = xmlCert.getX509Certificate();
            if (cert != null) {
                return cert;
            }
        }
        return null;
    } catch (XMLSecurityException ex) {
        if (log.isLoggable(java.util.logging.Level.FINE)) {
            log.log(java.util.logging.Level.FINE, "XMLSecurityException", ex);
        }
        throw new KeyResolverException("generic.EmptyMessage", ex);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:42,代码来源:X509CertificateResolver.java


注:本文中的com.sun.org.apache.xml.internal.security.utils.XMLUtils.selectDsNodes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。