Class SMPExtensionConverter
java.lang.Object
com.helger.smpclient.peppol.utils.SMPExtensionConverter
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 Summary
Modifier and TypeMethodDescriptionstatic com.helger.xsds.peppol.smp1.ExtensionTypeConvert the passed XML string to an SMP extension type.static StringconvertToString(com.helger.xsds.peppol.smp1.ExtensionType aExtension) Convert the passed extension type to a string representation.
-
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 benull.- Returns:
nullif no extension was passed - the XML representation of the extension otherwise.- Throws:
IllegalArgumentException- If the Extension cannot be converted to a String
-
convert
Convert the passed XML string to an SMP extension type.- Parameters:
sXML- the XML representation to be converted.- Returns:
nullif the passed string is empty or does not represent valid XML.
-