Class AS2XMLHelper

java.lang.Object
com.helger.as2lib.util.AS2XMLHelper

@Immutable public final class AS2XMLHelper extends Object
  • Method Details

    • getAllAttrsWithLowercaseName

      @Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.attr.StringMap getAllAttrsWithLowercaseName(@Nonnull com.helger.xml.microdom.IMicroElement aElement)
      Get all attributes of the passed element as a map with a lowercase attribute name.
      Parameters:
      aElement - The source element to extract the attributes from. May not be null.
      Returns:
      A new map and never null but maybe empty.
    • getAllAttrsWithLowercaseNameWithRequired

      @Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.attr.StringMap getAllAttrsWithLowercaseNameWithRequired(@Nonnull com.helger.xml.microdom.IMicroElement aElement, @Nonnull String... aRequiredAttributes) throws AS2Exception
      Throws:
      AS2Exception
    • mapAttributeNodes

      @Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> mapAttributeNodes(@Nonnull com.helger.xml.microdom.IMicroElement aNode, @Nonnull String sNodeName, @Nonnull String sNodeKeyName, @Nonnull String sNodeValueName) throws AS2Exception
      Parameters:
      aNode - Start node. May not be null.
      sNodeName - The element name to be queried relative to the start node.
      sNodeKeyName - The attribute name of the key.
      sNodeValueName - The attribute name of the value.
      Returns:
      The non-null Map.
      Throws:
      AS2Exception - In case a node is missing a key or value attribute.
    • createComponent

      @Nonnull public static <T extends IDynamicComponent> T createComponent(@Nonnull com.helger.xml.microdom.IMicroElement aElement, @Nonnull Class<T> aClass, @Nonnull IAS2Session aSession, @Nullable String sBaseDirectory) throws AS2Exception
      Throws:
      AS2Exception