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...


...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.