drawn red maple leaf

File formats that do not rock: CS...X!?

main » journal » entry
 

January 8th, 2010 - 07:25

Comma separated XML – or also known as “parse this!”

<data>
  funny;column;description;goes into this field
  oh;and;here;is;some;other; column description
  dataset;1;2;3
  <moredata>
    some id;123;43;653;314;fubar
    some id;325;31;434;143;blah
    some id;343;fu;---;;bar
  </moredata>
  <evenmoredata>
    interesting;description;for;some;columns;below or above
    blah;fasel;kek;blubb;10;432441
    foo;bar;baz;<3;2352;23
  </evenmoredata>
</data>

Exercises:

  1. Find the dataset lines matching the definitions.
  2. Parse a single document containing 68000 such datasets.
  3. Write all of the data into an SQL database using sensible data types (text for each column does not count!) succeeding on the first try.