At his day job, Peter writes code for the manufacturing industry and, in doing so, works a lot with PLCs from GE. As of late, he's been working on an application that processes XML configuration files exported from GE's main programming IDE "Machine Edition" to generate extremely complex diagnostic information that the IDE doesn't provide. You know, things like, "Has that variable that you are using in a calculation ever been initialized?"

As he was looking through a 23,000 line configuration file that described the hardware setup of a particular project, Peter discovered 8,000 lines like the following that were used to store binary blob data.

<TAG_DSlength>6248</TAG_DSlength>
<TAG_DSdata>0x66</TAG_DSdata>
<TAG_DSdata>0x18</TAG_DSdata>
<TAG_DSdata>0x50</TAG_DSdata>
<TAG_DSdata>0x4b</TAG_DSdata>
<TAG_DSdata>0x3</TAG_DSdata>
<TAG_DSdata>0x4</TAG_DSdata>

(6236 lines additional lines ...)

<TAG_DSdata>0x1a</TAG_DSdata>
<TAG_DSdata>0x18</TAG_DSdata>
<TAG_DSdata>0x0</TAG_DSdata>
<TAG_DSdata>0x0</TAG_DSdata>
<TAG_DSdata>0x0</TAG_DSdata>
<TAG_DSdata>0x0</TAG_DSdata>
<TAG_DSdataend>DSdataend_value</TAG_DSdataend>
<TAG_SSTlength>1653</TAG_SSTlength>
<TAG_SSTdata>0x43</TAG_SSTdata>
<TAG_SSTdata>0x48</TAG_SSTdata>
<TAG_SSTdata>0x1</TAG_SSTdata>
<TAG_SSTdata>0x0</TAG_SSTdata>
<TAG_SSTdata>0xb</TAG_SSTdata>
<TAG_SSTdata>0x0</TAG_SSTdata>

(1641 additional lines ...)

<TAG_SSTdata>0x6e</TAG_SSTdata>
<TAG_SSTdata>0x63</TAG_SSTdata>
<TAG_SSTdata>0x6f</TAG_SSTdata>
<TAG_SSTdata>0x64</TAG_SSTdata>
<TAG_SSTdata>0x65</TAG_SSTdata>
<TAG_SSTdata>0x72</TAG_SSTdata>
<TAG_SSTdataend>SSTdataend_value</TAG_SSTdataend>
<TAG_DPV1length>225</TAG_DPV1length>
<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1data>0x1</TAG_DPV1data>
<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1data>0x0</TAG_DPV1data>

(213 additional lines ...)

<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1data>0x0</TAG_DPV1data>
<TAG_DPV1dataend>DPV1dataend_value</TAG_DPV1dataend>

Sure, it's cryptic and a waste of space to store binary data that way but, to be fair - if the spec was to only save as XML format, then GE hit the mark.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!