Class AppHdrParser


  • public class AppHdrParser
    extends java.lang.Object
    Since:
    9.1.2
    • Constructor Detail

      • AppHdrParser

        public AppHdrParser()
    • Method Detail

      • parse

        public static java.util.Optional<AppHdr> parse​(java.lang.String xml)
        Detects the header version by reading the namespace in the AppHdr element and parses the header content to a specific header model: LegacyAppHdr, BusinessAppHdrV01 or BusinessAppHdrV02 Default adapters are applied, for more options use parse(String, MxReadParams)
        Parameters:
        xml - a not null XML to parse, only the AppHdr element is parse, the rest of the XML content is silently ignored
        Returns:
        parsed header
      • parse

        public static java.util.Optional<AppHdr> parse​(java.lang.String xml,
                                                       MxReadParams params)
        Detects the header version by reading the namespace in the AppHdr element and parses the header content to a specific header model: LegacyAppHdr, BusinessAppHdrV01 or BusinessAppHdrV02
        Parameters:
        xml - an not null XML to parse, only the AppHdr element is parse, the rest of the XML content is silently ignored
        params - not null unmarshalling parameters
        Returns:
        parsed header
        Since:
        9.2.6
      • parse

        public static java.util.Optional<AppHdr> parse​(org.w3c.dom.Element e)
        Parse the business header from an XML Element node

        The implementation serializes the element into XML and calls parse(String)