gpt4 book ai didi

com.helger.xml.XMLHelper.filterElementWithNamespaceAndLocalName()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 01:19:05 28 4
gpt4 key购买 nike

本文整理了Java中com.helger.xml.XMLHelper.filterElementWithNamespaceAndLocalName()方法的一些代码示例,展示了XMLHelper.filterElementWithNamespaceAndLocalName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLHelper.filterElementWithNamespaceAndLocalName()方法的具体详情如下:
包路径:com.helger.xml.XMLHelper
类名称:XMLHelper
方法名:filterElementWithNamespaceAndLocalName

XMLHelper.filterElementWithNamespaceAndLocalName介绍

暂无

代码示例

代码示例来源:origin: com.helger/ph-xml

@Nonnull
public static IIterableIterator <Element> getChildElementIteratorNS (@Nullable final Node aStartNode,
                                   @Nullable final String sNamespaceURI,
                                   @Nonnull @Nonempty final String sLocalName)
{
 return new ChildElementIterator (aStartNode).withFilter (filterElementWithNamespaceAndLocalName (sNamespaceURI,
                                                  sLocalName));
}

代码示例来源:origin: com.helger/ph-xml

/**
 * Search all child nodes of the given for the first element that has the
 * specified tag name.
 *
 * @param aStartNode
 *        The parent element to be searched. May be <code>null</code>.
 * @param sNamespaceURI
 *        Namespace URI to search. May be <code>null</code>.
 * @param sLocalName
 *        The tag name to search.
 * @return <code>null</code> if the parent element has no such child element.
 */
@Nullable
public static Element getFirstChildElementOfName (@Nullable final Node aStartNode,
                         @Nullable final String sNamespaceURI,
                         @Nonnull @Nonempty final String sLocalName)
{
 if (aStartNode == null)
  return null;
 return new ChildElementIterator (aStartNode).findFirst (filterElementWithNamespaceAndLocalName (sNamespaceURI,
                                                 sLocalName));
}

代码示例来源:origin: com.helger/ph-as4-lib

@Nonnull
@ReturnsMutableCopy
private static ICommonsList <Node> _getAllReferences (@Nullable final Node aUserMessage)
{
 final ICommonsList <Node> aDSRefs = new CommonsArrayList <> ();
 Node aNext = XMLHelper.getFirstChildElementOfName (aUserMessage, "Envelope");
 if (aNext != null)
 {
  aNext = XMLHelper.getFirstChildElementOfName (aNext, "Header");
  if (aNext != null)
  {
   aNext = XMLHelper.getFirstChildElementOfName (aNext, CAS4.WSSE_NS, "Security");
   if (aNext != null)
   {
    aNext = XMLHelper.getFirstChildElementOfName (aNext, CAS4.DS_NS, "Signature");
    if (aNext != null)
    {
     aNext = XMLHelper.getFirstChildElementOfName (aNext, CAS4.DS_NS, "SignedInfo");
     if (aNext != null)
     {
      new ChildElementIterator (aNext).findAll (XMLHelper.filterElementWithNamespaceAndLocalName (CAS4.DS_NS,
                                                    "Reference"),
                           aDSRefs::add);
     }
    }
   }
  }
 }
 return aDSRefs;
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com