Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    importing xml into mysql

    Hi,

    I have a xml file with complicated structure and lot of information an I want to import this file into a mysql table.
    Xml is some that:

    - <root>
    - <dir name="Algemene Info">
    - <dir name="Algemene informatie over uw Gemeente" subtitle="Openingstijden, adres, rechten, informatie, tarieven" prio="3">
    - <item id="195" accepted="true" prio="7" lastupdate="3DDB58D" lasteditor="Taken">
    <titel>Openingstijden en adres gemeentehuis</titel>
    <datumin>06-02-2003</datumin>
    <omschrijving />
    <datumuit />
    <lasteditor>Taken</lasteditor>
    - <body>
    - <![CDATA[ <STRONG>U kunt ons op de volgende manieren bereiken:<BR></STRONG>Gemeente Wijk bij Duurstede<BR>Karel de Grotestraat 30,<BR>Postbus 83, 3960 BB Wijk bij Duurstede.<BR>Telefoonnummer: 0343-595595<BR>Telefax: 0343-595599<BR>E-mail: <A href="mailto:info@wijkbijduurstede.nl" target=_blank>info@wijkbijduurstede.nl</A> <BR><BR><
    ]]>
    </body>
    </item>
    - <item id="196" lastupdate="2116B79" prio="6">
    <titel>Tarieven diensten gemeente Wijk bij Duurstede per 1 januari 2003</titel>
    <datumin>06-02-2003</datumin>
    <omschrijving />
    <datumuit />
    - <body>
    - <![CDATA[
    <TABLE style="FONT-WEIGHT: normal; FONT-SIZE: x-small; COLOR: black; FONT-FAMILY: Arial" cellSpacing=0 cellPadding=0 x:str>
    <TBODY>
    <TR>
    <TD vAlign=top>Paspoort</TD>
    <TD vAlign=top x:num="33.37">&nbsp;€&nbsp;&nbsp; 35,55 </TD></TR>
    <TR>
    <TD vAlign=top>Spoed paspoort</TD>
    <TD vAlign=top x:num="33.37">&nbsp;€&nbsp;&nbsp;&nbsp;71,70</TD></TR>

    and I want to put this information in 2 tables. First table store information about directories(id,subid,name,description) and second table store information about file (items ...) into more fields (name file, description, accept, date, body of file ...)

    Who is the efficient method to do that ???


    thks a lot and I wait your sugestion

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Scotland
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts
    8 words mate...

    "print it out and type it back in"

    if it was a .csv file it could be done easily, but your xml is just too complex.

    sorry!
    My body's a temple... and like those ancient Greek ones it's a ruin
    sweenster.co.uk

  • #3
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •