- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.helger.xml.XMLHelper
类的一些代码示例,展示了XMLHelper
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLHelper
类的具体详情如下:
包路径:com.helger.xml.XMLHelper
类名称:XMLHelper
[英]This class contains multiple XML utility methods.
[中]
代码示例来源:origin: com.helger/peppol-commons
/**
* Get the address contained in the passed endpoint reference.
*
* @param aEndpointReference
* The endpoint reference to retrieve the address from. May not be
* <code>null</code>.
* @return The contained address.
*/
@Nullable
public static String getAddress (@Nonnull final W3CEndpointReference aEndpointReference)
{
ValueEnforcer.notNull (aEndpointReference, "EndpointReference");
final Element eAddress = XMLHelper.getFirstChildElementOfName (_convertReferenceToXML (aEndpointReference),
"Address");
return eAddress == null ? null : eAddress.getTextContent ();
}
代码示例来源:origin: com.helger/ph-xml
@Nullable
public static Element getDocumentElement (@Nullable final Node aNode)
{
final Document aDoc = getOwnerDocument (aNode);
return aDoc == null ? null : aDoc.getDocumentElement ();
}
代码示例来源: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;
}
代码示例来源:origin: com.helger/ph-bdve
XMLHelper.getOwnerDocument (aNode));
if (aResult != null && !aResult.booleanValue ())
for (final Element eError : XMLHelper.getChildElementIterator (aDoc.getDocumentElement (), "Error"))
final String sPattern = XMLHelper.getFirstChildElementOfName (eError, "Pattern").getTextContent ();
final String sDescription = XMLHelper.getFirstChildElementOfName (eError, "Description")
.getTextContent ();
final String sXPath = XMLHelper.getFirstChildElementOfName (eError, "Xpath").getTextContent ();
aErrorList.add (new SVRLErrorBuilder (sPattern).setErrorLocation (new SimpleLocation (aSource.getSystemID ()))
.setErrorText (sDescription)
代码示例来源:origin: com.helger/ph-as4-servlet
final Node aHeaderNode = XMLHelper.getFirstChildElementOfName (aSOAPDocument.getDocumentElement (),
eSOAPVersion.getNamespaceURI (),
eSOAPVersion.getHeaderElementName ());
final QName aQName = XMLHelper.getQName (aHeaderChild);
final String sMustUnderstand = aHeaderChild.getAttributeNS (eSOAPVersion.getNamespaceURI (), "mustUnderstand");
final boolean bIsMustUnderstand = eSOAPVersion.getMustUnderstandValue (true).equals (sMustUnderstand);
代码示例来源:origin: com.helger/ph-xml
append (aParentNode, ((Document) aChild).getDocumentElement ());
final Document aParentDoc = getOwnerDocument (aParentNode);
if (getOwnerDocument (aChildNode).equals (aParentDoc))
aParentNode.appendChild (getOwnerDocument (aParentNode).createTextNode ((String) aChild));
append (aParentNode, aSubChild);
append (aParentNode, aSubChild);
代码示例来源:origin: com.helger/ph-xml
public static void forAllAttributes (@Nullable final Element aSrcNode,
@Nonnull final BiConsumer <? super String, ? super String> aConsumer)
{
forAllAttributes (aSrcNode, x -> aConsumer.accept (x.getName (), x.getValue ()));
}
代码示例来源:origin: com.helger/ph-xml
final boolean bIndentPrev = aPrevSibling == null || !XMLHelper.isInlineNode (aPrevSibling) || bIsRootElement;
final boolean bIndentNext = aNextSibling == null || !XMLHelper.isInlineNode (aNextSibling);
final boolean bIsFirstChildElement = bHasChildren && !XMLHelper.isInlineNode (aElement.getFirstChild ());
XMLHelper.forAllAttributes (aElement, aAttr -> {
final String sAttrNamespaceURI = StringHelper.getNotNull (aAttr.getNamespaceURI ());
代码示例来源:origin: phax/ph-schematron
@Nonnull
private static String _getPathToNode (@Nonnull final Node aNode)
{
return XMLHelper.getPathToNode2 (aNode, "/");
}
代码示例来源:origin: com.helger/ph-xml
@Nonnegative
public static int getDirectChildElementCount (@Nullable final Element aParent)
{
return aParent == null ? 0 : CollectionHelper.getSize (getChildElementIterator (aParent));
}
代码示例来源:origin: com.helger/ph-xml
@Nullable
public static String getNamespaceURI (@Nullable final Node aNode)
{
if (aNode instanceof Document)
{
// Recurse into document element
return getNamespaceURI (((Document) aNode).getDocumentElement ());
}
if (aNode != null)
return aNode.getNamespaceURI ();
return null;
}
代码示例来源: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
@Nonnull
@ReturnsMutableCopy
public static ICommonsOrderedMap <String, String> getAllAttributesAsMap (@Nullable final Element aSrcNode)
{
final ICommonsOrderedMap <String, String> ret = new CommonsLinkedHashMap <> ();
// Cast needed for Oracle JDK 8
forAllAttributes (aSrcNode, (BiConsumer <? super String, ? super String>) ret::put);
return ret;
}
代码示例来源:origin: com.helger/ph-schematron
@Nonnull
private static String _getPathToNode (@Nonnull final Node aNode)
{
return XMLHelper.getPathToNode2 (aNode, "/");
}
代码示例来源:origin: com.helger/ph-xml
@Nonnegative
public static int getDirectChildElementCount (@Nullable final Element aParent,
@Nonnull @Nonempty final String sTagName)
{
return aParent == null ? 0 : CollectionHelper.getSize (getChildElementIterator (aParent, sTagName));
}
代码示例来源:origin: com.helger/ph-as4-servlet
final String sNamespaceURI = XMLHelper.getNamespaceURI (aSOAPDocument);
eSOAPVersion = ArrayHelper.findFirst (ESOAPVersion.values (), x -> x.getNamespaceURI ().equals (sNamespaceURI));
if (eSOAPVersion == null)
代码示例来源: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-servlet
/**
* Checks if the Document has a SOAPBodyPayload.
*
* @param aPModeLeg
* to get the SOAPVersion
* @param aSOAPDoc
* the document that should be checked if it contains a SOAPBodyPayload
* @return true if it contains a SOAPBodyPayload else false
*/
private static boolean _checkSOAPBodyHasPayload (@Nonnull final PModeLeg aPModeLeg, @Nonnull final Document aSOAPDoc)
{
// Check if a SOAPBodyPayload exists
final Element aBody = XMLHelper.getFirstChildElementOfName (aSOAPDoc.getFirstChild (),
aPModeLeg.getProtocol ()
.getSOAPVersion ()
.getBodyElementName ());
return aBody != null && aBody.hasChildNodes ();
}
代码示例来源:origin: com.helger/ph-bdve
/**
* Create a complete validation source from an existing DOM node.
*
* @param sSystemID
* System ID to use. May be <code>null</code>.
* @param aNode
* The node to use. May not be <code>null</code>.
* @return Never <code>null</code>.
*/
@Nonnull
public static ValidationSource create (@Nullable final String sSystemID, @Nonnull final Node aNode)
{
ValueEnforcer.notNull (aNode, "Node");
// Use the owner Document as fixed node
return new ValidationSource (sSystemID, XMLHelper.getOwnerDocument (aNode), false);
}
代码示例来源:origin: com.helger/ph-xml
aElement.getLocalName ())
: new MicroElement (aElement.getTagName ());
XMLHelper.forAllAttributes (aElement, aAttr -> {
final String sAttrNamespaceURI = aAttr.getNamespaceURI ();
if (sAttrNamespaceURI != null)
下午写了一个操作 XML 文件的类库,后来不用了, 水篇 文章存个档📋 整体功能 XMLHelper.cs 主要提供以下功能: 加载XML文件:从文件
本文整理了Java中com.helger.xml.XMLHelper.getOwnerDocument()方法的一些代码示例,展示了XMLHelper.getOwnerDocument()的具体用法。
本文整理了Java中com.helger.xml.XMLHelper.getPathToNode2()方法的一些代码示例,展示了XMLHelper.getPathToNode2()的具体用法。这些代码
本文整理了Java中com.helger.xml.XMLHelper.filterElementWithNamespaceAndLocalName()方法的一些代码示例,展示了XMLHelper.fi
本文整理了Java中com.helger.xml.XMLHelper.getChildElementIterator()方法的一些代码示例,展示了XMLHelper.getChildElementIt
本文整理了Java中com.helger.xml.XMLHelper.forAllAttributes()方法的一些代码示例,展示了XMLHelper.forAllAttributes()的具体用法。
本文整理了Java中com.helger.xml.XMLHelper.getFirstChildElementOfName()方法的一些代码示例,展示了XMLHelper.getFirstChildE
本文整理了Java中org.n52.svalbard.util.XmlHelper.getNamespace()方法的一些代码示例,展示了XmlHelper.getNamespace()的具体用法。这
本文整理了Java中org.n52.svalbard.util.XmlHelper.makeGmlIdsUnique()方法的一些代码示例,展示了XmlHelper.makeGmlIdsUnique(
本文整理了Java中org.n52.svalbard.util.XmlHelper.validateDocument()方法的一些代码示例,展示了XmlHelper.validateDocument(
本文整理了Java中org.n52.svalbard.util.XmlHelper.getPrefixForNamespace()方法的一些代码示例,展示了XmlHelper.getPrefixFor
本文整理了Java中org.n52.svalbard.util.XmlHelper.isNotNullAndEqualsNSs()方法的一些代码示例,展示了XmlHelper.isNotNullAnd
本文整理了Java中org.n52.svalbard.util.XmlHelper.parseXmlString()方法的一些代码示例,展示了XmlHelper.parseXmlString()的具体
本文整理了Java中org.n52.svalbard.util.XmlHelper.getGmlNSs()方法的一些代码示例,展示了XmlHelper.getGmlNSs()的具体用法。这些代码示例主
本文整理了Java中org.n52.svalbard.util.XmlHelper.checkAttributeForGmlId()方法的一些代码示例,展示了XmlHelper.checkAttrib
本文整理了Java中org.n52.svalbard.util.XmlHelper.updateGmlIDs()方法的一些代码示例,展示了XmlHelper.updateGmlIDs()的具体用法。这
本文整理了Java中org.n52.svalbard.util.XmlHelper.substituteElement()方法的一些代码示例,展示了XmlHelper.substituteElemen
本文整理了Java中org.finra.herd.dao.helper.XmlHelper.objectToXml()方法的一些代码示例,展示了XmlHelper.objectToXml()的具体用法
本文整理了Java中org.finra.herd.dao.helper.XmlHelper.unmarshallXmlToObject()方法的一些代码示例,展示了XmlHelper.unmarsha
试图调用方法 org.hibernate.internal.util.xml.XMLHelper.(Lorg/hibernate/boot/registry/classloading/spi/Clas
我是一名优秀的程序员,十分优秀!