Class SMPExtensionConverter

java.lang.Object
com.helger.smpclient.peppol.utils.SMPExtensionConverter

@Immutable public final class SMPExtensionConverter extends Object
This class is used for converting between a String representation of the extension element and the "ExtensionType" complex type used in the PEPPOL SMP.
Author:
Philip Helger
  • Method Details

    • convertToString

      @Nullable public static String convertToString(@Nullable com.helger.xsds.peppol.smp1.ExtensionType aExtension)
      Convert the passed extension type to a string representation.
      Parameters:
      aExtension - The extension to be converted. May be null.
      Returns:
      null if no extension was passed - the XML representation of the extension otherwise.
      Throws:
      IllegalArgumentException - If the Extension cannot be converted to a String
    • convert

      @Nullable public static com.helger.xsds.peppol.smp1.ExtensionType convert(@Nullable String sXML)
      Convert the passed XML string to an SMP extension type.
      Parameters:
      sXML - the XML representation to be converted.
      Returns:
      null if the passed string is empty or does not represent valid XML.