importing xml into mysql

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mbolintis
Forum Newbie
Posts: 2
Joined: Tue Jan 27, 2004 7:53 am

importing xml into mysql

Post 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?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Please don't cross-post - one post in one forum on one topic is plenty.

Mac
mbolintis
Forum Newbie
Posts: 2
Joined: Tue Jan 27, 2004 7:53 am

scuse me

Post by mbolintis »

scuse me !!! I dont read with atention your permissions ...
I dont repeat that in future ...
Post Reply