Class AppHdrParser
- java.lang.Object
-
- com.prowidesoftware.swift.model.mx.AppHdrParser
-
public class AppHdrParser extends java.lang.Object
- Since:
- 9.1.2
-
-
Constructor Summary
Constructors Constructor Description AppHdrParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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
orBusinessAppHdrV02
Default adapters are applied, for more options useparse(String, MxReadParams)
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
orBusinessAppHdrV02
static java.util.Optional<AppHdr>
parse(org.w3c.dom.Element e)
Parse the business header from an XML Element node
-
-
-
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
orBusinessAppHdrV02
Default adapters are applied, for more options useparse(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
orBusinessAppHdrV02
- Parameters:
xml
- an not null XML to parse, only the AppHdr element is parse, the rest of the XML content is silently ignoredparams
- 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 nodeThe implementation serializes the element into XML and calls
parse(String)
-
-