0
Hy 我試圖找出一個XML文件後的數據庫結構。我相對於這種複雜性來說是新的。創建mysql數據庫和導入XML
創建完成後我需要導入它。問題是我認爲它是使用連接創建的xml。你能給我一些建議如何處理這個問題。在我的XML一行看起來somethinh這樣的:
<listing>
<id>GS0147</id>
<date_added>2014-10-9</date_added>
<property_type>residential</property_type>
<property_subtype>appartment</property_subtype>
<listing_type>rent</listing_type>
<geo_location>
<lat>00000</lat>
<lon>26.13860</lon>
</geo_location>
<address>
<county>Bucuresti Ilfov</county>
<city>Bucuresti</city>
<neighbourhood>Berceni</neighbourhood>
<street>Ion Iriceanu</street>
<street_number/>
</address>
<price>
<price>1100</price>
<currency>EUR</currency>
<price_type>full</price_type>
<price_eur>1100</price_eur>
<rent_period/>
</price>
<area>35</area>
<land_area/>
<title>
<![CDATA[ Inchiriere garsoniera Berceni,Oltenitei,Iriceanu ]]>
</title>
<description>
<![CDATA[
<p><span style="font-size: medium;"><span style="font-family: Verdana;"><strong>&nbsp;Va ofer spre inchiriere o garsoniera in zona&nbsp;<span style="line-height: 115%;">BERCENI,&nbsp; Oltenitei, vila, confort, contorizata total, aer conditionat, catv, LCD, receiver, internet, balcon, foisor curte, strada necirculata, parcare, termen lung.Investitia lunara este de 1100 ron.</span></strong></span></span></p>
]]>
</description>
<images>
<image>
http://soft.echiparenet.ro/images/propertiessite/img_1240_15230.jpg
</image>
<image>
http://soft.echiparenet.ro/images/propertiessite/img_1240_15231.jpg
</image>
<image>
http://soft.echiparenet.ro/images/propertiessite/img_1240_15232.jpg
</image>
<image>
http://soft.echiparenet.ro/images/propertiessite/img_1240_15233.jpg
</image>
<image>
http://soft.echiparenet.ro/images/propertiessite/img_1240_15234.jpg
</image>
<image>
http://soft.echiparenet.ro/images/propertiessite/img_1240_15235.jpg
</image>
<image>
http://soft.echiparenet.ro/images/propertiessite/img_1240_15236.jpg
</image>
<image>
http://soft.echiparenet.ro/images/propertiessite/img_1240_15237.jpg
</image>
<image>
http://soft.echiparenet.ro/images/propertiessite/img_1240_15238.jpg
</image>
</images>
<url>
http://www.gabrielstefan.ro/garsoniera-de-inchiriat-berceni-bucuresti-1236.html
</url>
<rooms>1</rooms>
<bathrooms>1</bathrooms>
<kitchens>0</kitchens>
<balconies>0</balconies>
<appartment_type>3</appartment_type>
<floor>2</floor>
<building_floors>2</building_floors>
<air_conditionning>0</air_conditionning>
<internet>0</internet>
<television>0</television>
<security>0</security>
<phone>0</phone>
<heatting_system/>
<furnished/>
<wather>0</wather>
<gas>0</gas>
<electricity>0</electricity>
<street_front>0</street_front>
<termopan>0</termopan>
<wood_floors>0</wood_floors>
<parking/>
<garage/>
<paperwork/>
<build_year>2006</build_year>
<build_materials/>
</listing>
拉開xml。找出哪些標籤/孩子可以重複 - 那些進入子表。其他任何東西都可以進入主表。 – 2014-10-10 19:12:38
我做到了。我創建了表格,但是您知道如何同時導入表格。有沒有辦法在我的相關表中進行多重導入? – 2014-10-11 09:19:06