|
Posted by Bob Bedford on 07/18/05 19:54
"Peter van Schie" <vanschie.peter@gmail.com> a écrit dans le message de
news: 42dbdb98$0$14043$dbd4b001@news.wanadoo.nl...
> Bob Bedford wrote:
>>
>> Thanks for the advice.
>> Anyway for my first scripts I had to manage everything manually. Its'
>> there any class or code that takes out all datas from a XML and put it in
>> a simpler structure ? maybe an array, that let me create a simpler script
>> ?
>
> Hi Bob,
>
> You could use a dtd parser and then dynamically create a mysql table with
> that particular structure. Then after that you can put the data from the
> xml files in the right mysql table which belongs to its dtd.
> You'd get a column for each xml element. Handling nested xml data would be
> a little tougher though.
Thanks for reply Peter,
This is the problem, I've this structure (simplified)
<data1>
<group1>
<field1>
</field1>
<field2>
</field2>
</group1>
<group2>
<field1>
</field1>
</group2>
</data1>
and of course, group number is undefined and field number in each group is
also undefined.
What's the best approach ? for now I use xml_parser_create and check
manually everything.
but if I find a better way to handle datas, probably It will be simpler to
parse and save datas in the database,
Bob
Navigation:
[Reply to this message]
|