Page 1 of 1

importing xml into mysql

Posted: Tue Jan 27, 2004 7:53 am
by mbolintis
In fact my xml file is with a tree structure (with infinit levels and sublevels) who hold data about items:

- <dir for="informatie" name="root">
<dir name="Informatie generals" subtitle="opening .." prio="3">
<dir name="Informatie generals" subtitle="opening .." prio="3">
<item id=195 accepted="true" prio="7" >
<body>
<!CDATA[ <strong> Is that my body file ... ]]>
</body>
</item>
<item id=196 accepted="true" prio="7" >
<body>
<!CDATA[ <strong> Is that my body file ... ]]>
</body>
</item>
</dir>
<dir> .....


I must create in php/mysql that tree structure with that data.
I made 3 table in mysql. First table hold information about directories, second about items and the last about id_items / id_directories (where items are in that director...)
I can read the xml file and I put that in mysql (items and directories) but I dont know how I can reconstruct the tree structure( directories tags dont have information about id ...)

Know somebody how I resolve that problems?

Posted: Tue Jan 27, 2004 8:02 am
by twigletmac
Please don't cross-post - one post in one forum on one topic is plenty.

Mac

scuse me

Posted: Tue Jan 27, 2004 8:08 am
by mbolintis
scuse me !!! I dont read with atention your permissions ...
I dont repeat that in future ...