public class MxParseUtils
extends java.lang.Object
| Constructor and Description |
|---|
MxParseUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getBICFromDN(java.lang.String dn)
Distinguished Name structure: cn=name,ou=payment,o=bank,o=swift
Example: o=spxainjj,o=swift |
static java.util.Optional<MxId> |
identifyMessage(java.lang.String xml)
Takes an XML with an MX message and detects the specific message type
parsing just the namespace from the Document element.
|
static java.lang.String |
makeXmlLenient(java.lang.String xml)
This method is intended to fix some malformed XML content that is not compliant with the XML specification
to enable the parsing and processing of the payload to be lenient.
|
public static java.lang.String getBICFromDN(java.lang.String dn)
dn - the DN element contentpublic static java.util.Optional<MxId> identifyMessage(java.lang.String xml)
Example of a recognizable Document element:
<Doc:Document xmlns:Doc="urn:swift:xsd:camt.003.001.04" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
The implementation is intended to be lightweight and efficient, based on XMLStreamReader
public static java.lang.String makeXmlLenient(java.lang.String xml)
xml - original XML content