I have a highly structured XML file that I need to put into a table and retain the structure of the data.

I'm not talking about simply inserting the contents of the file into a field of the table.

I need to create an entry for each tag and then have each child tag associated with their parent, a little like a directory structure.
For example...

<FILE>
<H3>Some_Title</H3>
<DL>
<DT>contents_11</DT>
<DT>contents_12</DT>
<DT>contents_13</DT>
</DL>
<H3>Another_Title</H3>
<DL>
<DT>contents_21</DT>
<DT>contents_22</DT>
<DT>contents_23</DT>
</DL>
</FILE>

...which would then create a rows in my table where Some_Title has an id of 1 and contents_11/12/13 have a field 'parent_id' which is equal to 1.
Likewise Another_Title has id 5 and contents_21/22/23 have parent_id = 5.

Anyone ever come across a similar problem?
I've checked the archives and can't see anything quite like this.

Thanks.