Thread View: borland.public.delphi.database
1 messages
1 total messages
Started by J
Wed, 31 Oct 2007 21:49
Client Dataset XML Blob String Encode Decode String Text Field Mystery; Please Help
Author: J
Date: Wed, 31 Oct 2007 21:49
Date: Wed, 31 Oct 2007 21:49
103 lines
6734 bytes
6734 bytes
I was given an xml file that was created by an application written in Delphi
(source not available.)
Here is a portion of the xml file:
<?xml version="1.0" standalone="yes"?>
<DATAPACKET Version="2.0">
<METADATA>
<FIELDS>
<FIELD attrname="BRANCHID" fieldtype="r8"/>
<FIELD attrname="ELEMTYPE" fieldtype="string" WIDTH="50"/>
<FIELD attrname="ELEMIDX" fieldtype="r8"/>
<FIELD attrname="ISIMPORT" fieldtype="string" SUBTYPE="FixedChar"
WIDTH="1"/>
<FIELD attrname="DESCRIPTION" fieldtype="string" WIDTH="100"/>
<FIELD attrname="MODIFIER" fieldtype="string" WIDTH="40"/>
<FIELD attrname="SCRIPT" fieldtype="bin.hex" SUBTYPE="Binary" WIDTH="1"/>
<FIELD attrname="LASTMOD" fieldtype="dateTime"/>
<FIELD attrname="ESCOWNED" fieldtype="string" SUBTYPE="FixedChar"
WIDTH="1"/>
</FIELDS>
<PARAMS LCID="1033"/>
</METADATA>
<PARAMS LCID="1033"/>
</METADATA>
<ROWDATA>
</ROWDATA>
<BLOBDATA>
<BPARM COMP="0" SPECCODE="2"/>
<ROW BRANCHID="0" ELEMTYPE="D_ScheduledTotalPayment" ELEMIDX="1"
ISIMPORT="N" DESCRIPTION="Scheduled Total Payment" MODIFIER="MOHAN"
SCRIPT="50726F63656475726520445F5363686564756C6564546F74616C5061796D656E745F4E5F313B0D0A5661720D0A20202069203A20496E74656765720D0A202020656E64203A20496E74656765720D0A202020706D7441203A20537472696E670D0A656E645661720D0A0D0A2020202020656E64203A3D20454C454D532832313339290D0A2020202020466F722069203A3D203120746F20656E640D0A2020202020202020706D7441203A3D20225363686564756C6564546F74616C5061796D656E742E22202B20494E54544F5354522869290D0A2020202020202020786D6C4E657753747228322C20332C20706D74412C2027272C2054525545290D0A2020202020202020786D6C4E657741747453747228332C20274454272C2053545228406462323133395B695D2C202223232C2323232C2323232E232322292C2054525545290D0A2020202020656E64466F720D0A0D0A456E6450726F633B0D0A"
LASTMOD="20030502T08:16:00000"/>
<ROW BRANCHID="0" ELEMTYPE="D_ScheduledPaymentDate" ELEMIDX="1"
ISIMPORT="N" DESCRIPTION="Scheduled Payment Date" MODIFIER="LOCKE"
SCRIPT="6D8F4F6BC24010C5EF817C878797445C8AD19E94400B8920B46970572F52429A1D6CC0ECCA32F6CFB72FBB854A5BE736F3DE6FE64DED6C47FAEC084523BB57D2E723E9BAFD1CC870D1323555932DE3E8AD757104A0C7026BC374A0EF9E8CFE33390D5C6001C9AE37873822A3779E0D5AA880E4281FCA4799CEB2DBE9F8A2ADACF327726460EB9D17E967758ED1B5A037234CB0AE947A926A93F6E35FE4C770ACE85DB24B670273113609248980DA6CCB6BDE7B666F9F0B24854A04EEF48BCFBAEF9FFF3164F4CA86174BA36B67BB651C7D01"
LASTMOD="20030502T08:16:00000"/>
</BLOBDATA>
<TABLENAME>XMLPED</TABLENAME>
</DATAPACKET>
In particular it is the values for the SCRIPT element that I am having
difficulty with. I was able to recognize that it was some kind of encoding;
After a lot of trial and error, it turned out to be base 2. After decoding
it here is what it looks like:
Original Data (w/ line breaks inserted) Decoded
Data (w/ line breaks inserted)
--------------------------------------------------------- -----------------------------------------------------------
50726F63656475726520445F53636865647 Procedure
D_ScheduledTotalPayment_N_1;
56C6564546F74616C5061796D656E745F4E Var
5F313B0D0A5661720D0A20202069203A204 I : Integer
96E74656765720D0A202020656E64203A20 end : Integer
496E74656765720D0A202020706D7441203 pmtA : String
A20537472696E670D0A656E645661720D0A endVar
0D0A2020202020656E64203A3D20454C454
D532832313339290D0A2020202020466F72 end := ELEMS(2139)
2069203A3D203120746F20656E640D0A202 For i := 1 to end
0202020202020706D7441203A3D20225363 pmtA :=
"ScheduledTotalPayment."+INTTOSTR(i)
686564756C6564546F74616C5061796D656 xmlNewStr(2, 3, pmtA, '',
TRUE)
E742E22202B20494E54544F535452286929 xmlNewAttStr(3, 'DT',
STR(@db2139[i], 0D0A2020202020202020786D6C4E6577537
"##,###,###.##"), TRUE) endFor
47228322C20332C20706D74412C2027272C
2054525545290D0A2020202020202020786 EndProc;
D6C4E657741747453747228332C20274454
272C2053545228406462323133395B695D2
C202223232C2323232C2323232E23232229
2C2054525545290D0A2020202020656E644
66F720D0A0D0A456E6450726F633B0D0A
6D8F4F6BC24010C5EF817C878797445C8AD m�Ok�@ ��|??-D\S�z"@
19E94400B8920B46970572F52429A1D6CC0 ? �ipW/RBs l���2�Ϸ
ECCA32F6CFB72FBB854A5BE736F3DE6FE64 /".J[�6��o�M�l
DED6C47FAEC084523BB57D2E723E9BAFD1C G�� E#"W��#�� �p�25U"-��uq
C870D1323555932DE3E8AD757104A0C7026 � k�t �zO�39
BC374A0EF9E8CFE33390D5C6001C9AE3787 \` ɮ7?8"�wz
3822A3779E0D5AA880E4281FCA4799CEB2D Z�?�(-�GT���
BE9F8A2ADACF327726460EB9D17E967758E 'rd`� �guZѵ
D1B5A037234CB0AE947A926A93F6E35FE4C 7#L��"z'j"��_��p�]
770ACE85DB24B670273113609248980DA6C �Kg s 6 $??�l�k�
CB6BDE7B666F9F0B24854A04EEF48BCFBAE {foY$.J ��<Ϻ�Y�1d��? K�kg"e }
F9FFF3164F4CA86174BA36B67BB651C7D01
I had no problem with records like the first one, however there are many
like the second one. It seems to be some type of compressed string, but I am
not sure how to decompress or unzip it. I also suspect that it was created
with a client dataset with an ADO or Interbase database on the server side.
So, anyone got any suggestions on how I can get decode this?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads