Class MxParser
- java.lang.Object
-
- com.prowidesoftware.swift.io.parser.MxParser
-
@Deprecated @ProwideDeprecated(phase4=SRU2023) public class MxParser extends java.lang.Object
Deprecated.see deprecation notes on each methodThis class is currently deprecated. The API provided is no longer useful or has been replaced by similar or moved methods in:AbstractMX
,AppHdr
,AppHdrParser
,MxNode
orMxParseUtils
- Since:
- 7.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MxParser.MxStructureInfo
Deprecated.theAbstractMX.parse(String)
can be used to parse any unknown message.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DOCUMENT_LOCALNAME
Deprecated.useAbstractMX.DOCUMENT_LOCALNAME
insteadstatic java.lang.String
HEADER_LOCALNAME
Deprecated.useAppHdr.HEADER_LOCALNAME
instead
-
Method Summary
-
-
-
Field Detail
-
HEADER_LOCALNAME
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static final java.lang.String HEADER_LOCALNAME
Deprecated.useAppHdr.HEADER_LOCALNAME
instead- See Also:
- Constant Field Values
-
DOCUMENT_LOCALNAME
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static final java.lang.String DOCUMENT_LOCALNAME
Deprecated.useAbstractMX.DOCUMENT_LOCALNAME
instead- Since:
- 7.8.4
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MxParser
@Deprecated @ProwideDeprecated(phase4=SRU2023) public MxParser(java.io.File file) throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
MxParser
@Deprecated @ProwideDeprecated(phase4=SRU2023) public MxParser(java.io.InputStream stream) throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
MxParser
@Deprecated @ProwideDeprecated(phase4=SRU2023) public MxParser(java.lang.String message)
Deprecated.
-
-
Method Detail
-
parseBusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static BusinessHeader parseBusinessHeader(org.w3c.dom.Element e)
Deprecated.useAppHdrParser.parse(Element)
instead
-
parseAppHdr
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static AppHdr parseAppHdr(org.w3c.dom.Element e)
Deprecated.useAppHdrParser.parse(Element)
instead- Since:
- 9.0.1
-
parseApplicationHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static ApplicationHeader parseApplicationHeader(MxNode tree)
Deprecated.useLegacyAppHdr.parse(String)
instead
-
parseBusinessApplicationHeaderV01
@Deprecated @ProwideDeprecated(phase4=SRU2023) public static BusinessApplicationHeaderV01 parseBusinessApplicationHeaderV01(MxNode tree)
Deprecated.useBusinessAppHdrV01.parse(String)
instead
-
getBICFromDN
@ProwideDeprecated(phase4=SRU2023) @Deprecated public static java.lang.String getBICFromDN(java.lang.String dn)
Deprecated.useMxParseUtils.getBICFromDN(String)
instead
-
parse
@Deprecated @ProwideDeprecated(phase4=SRU2023) public MxNode parse()
Deprecated.useMxNode.parse(String)
instead
-
parseBusinessHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessHeader parseBusinessHeader()
Deprecated.useAppHdrParser.parse(String)
instead
-
parseAppHdr
@Deprecated @ProwideDeprecated(phase4=SRU2023) public AppHdr parseAppHdr()
Deprecated.useAppHdrParser.parse(String)
instead- Returns:
- parsed header or null if the content cannot be parsed or the header is not present in the XML
- Since:
- 9.0.1
-
parseApplicationHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public ApplicationHeader parseApplicationHeader()
Deprecated.useLegacyAppHdr.parse(String)
instead
-
parseBusinessApplicationHeaderV01
@Deprecated @ProwideDeprecated(phase4=SRU2023) public BusinessApplicationHeaderV01 parseBusinessApplicationHeaderV01()
Deprecated.useBusinessAppHdrV01.parse(String)
instead
-
detectMessage
@Deprecated @ProwideDeprecated(phase4=SRU2023) public MxId detectMessage()
Deprecated.useMxParseUtils.identifyMessage(String)
instead- Returns:
- id with the detected MX message type or null if it cannot be determined.
- Since:
- 7.7
-
analyzeMessage
@Deprecated @ProwideDeprecated(phase4=SRU2023) public MxParser.MxStructureInfo analyzeMessage()
Deprecated.theAbstractMX.parse(String)
can be used to parse any unknown message. If you just want to detect the message type you can also use theMxParseUtils.identifyMessage(String)
Convenient API to get structure information from an MX message.This can be helpful when the actual content of an XML is unknown and some preprocessing of the XML must be done in order to parse or validate its content properly.
The implementation is intended to be lightweight and efficient, based on
XMLStreamReader
If the message contains more than one Document element, the first one will be picked. The same applies for the header, only the first AppHdr will be picked
- Since:
- 7.10.3
-
stripDocument
@Deprecated @ProwideDeprecated(phase4=SRU2023) public java.lang.String stripDocument()
Deprecated.parse the message usingAbstractMX.parse(String)
instead, and then use any of the document serializer methods such asAbstractMX.document()
Helper API to strip Document portion of message XML.This API is convenient when only the Document element of an MX message is needed and the wrapper/payload structure is unknown.
This implementation is intended to be lightweight and efficient so it actually does a simple substring operation on the XML using information provided by the result of
analyzeMessage()
. The XML is not converted into DOM on purpose because we want to strip the content event when the XML is not totally well-formed.If the message contains more than one Document element the expected result is as follows:
- If the documents are nested (this can happen for example when an additional MX message is provided within a supplementary data element within the main MX) then the outermost Document will be returned.
- If the documents are not-nested (weird situation) the result might be not well-formed
- Returns:
- XML with Document element of the Mx message or null if message is blank or invalid
- Since:
- 7.8.4
-
stripHeader
@Deprecated @ProwideDeprecated(phase4=SRU2023) public java.lang.String stripHeader()
Deprecated.parse the message usingAbstractMX.parse(String)
instead, and then use any of the header serializer methods such asAbstractMX.header()
Helper API to strip AppHdr portion of message XML.This API is convenient when only the header element of an MX message is needed and the wrapper/payload structure is unknown.
To gather the header already parsed into objects see
parseBusinessHeader()
This implementation is intended to be lightweight and efficient so it actually does a simple substring operation on the XML using information provided by the result of
analyzeMessage()
. The XML is not converted into DOM.
If the message contains more than one AppHdr element the expected result is as follows:- If the headers are not nested, the first one will be returned.
- If the headers are nested (weird situation) the result might be not well-formed
- Returns:
- XML with AppHdr element of the Mx message or null if not found
- Since:
- 7.8.4
-
-