Cannot decouple strange XML format with Java and JAXB

I need to get financial data using the Open Financial Exchange (OFX) protocol. To do this, I use JAXB to marshal the tree of objects into an XML string that sets the data request parameters, and then I send this XML string to the bank server. The bank then responds with an XML string containing the requested data, which I cancel into the object tree using JAXB. For the first two banks I tried, I retrieved the data back in a well-formed XML that corresponded to the published OFX scheme, and I was able to easily untie it with JAXB.

However, when I requested data from Citigroup, they sent me the following back:

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE

<OFX>
<SIGNONMSGSRSV1>
<SONRS>
<STATUS>
<CODE>0
<SEVERITY>INFO
</STATUS>
<DTSERVER>20150513180826.000
<LANGUAGE>ENG
<FI>
<ORG>Citigroup
<FID>24909
</FI>
</SONRS>
</SIGNONMSGSRSV1>
</OFX>

, , , . , , JAXB . XML, (1) XML, (2) ( ) <?...? > ( 3) , , .

XML- , , XML . , .

- ? , (, ), . , .

+4
2

, , , XML, SGML (. DATA:OFXSGML). , XML. , , , , . DTD SGML, , omnimark, " " .

+1

, , - , , , , "" , , , ( ) . . - XML, , JAXB.

0

All Articles