Converting MBOX to SQL

stephenwilliams

New Member
I have some old mbox files that I want to do some stats analysis on. So far I've found conversions for mbox -> xml. I haven't found a convert for xml -> sql. For example given:\[code\] <message id="0" mbox="Sent"> <received> <date>20021220</date> <time>17:17:44</time> </received> <from> <name>joe</name> <email>[email protected]</email> </from> <to> <name>jacob</name> <email>[email protected]</email> </to> <messageid>[email protected]</messageid> <inreplyto>000901c2a766$8858f7f0$be9627d9@hewlettyf9yyzb</inreplyto> <subject>Re: Things</subject> <text> HI </text> <mboxname>Sent</mboxname> </message>\[/code\]I can use something like:\[code\]LOAD XML LOCAL INFILE 'C:/ ... /MySQL Data/data/test/clipped_messages_0001.xml'INTO TABLE test_1ROWS IDENTIFIED BY '<message>';\[/code\]If I want to construct a table with "message-messageid" or "message-subject", this is fine. But how to I import child nodes like "message-to-name" or "message-from-email"?
 
Back
Top