0
下面是從XML提取:如何將XML數據導入到Mysql表中?
<?xml version='1.0' encoding='iso-8859-15'?>
<annonces>
<annonce>
<transac>V</transac>
<type_bien>Maison</type_bien>
<texte>hello world</texte>
<p_tel>1210212</p_tel>
<ann_prix>10</ann_prix>
<ann_cp>2870</ann_cp>
<ann_ville>CREPY</ann_ville>
<ann_dept>2</ann_dept>
<ann_surface>246</ann_surface>
<ann_nbpieces>7</ann_nbpieces>
<first_parution>1999-01-01</first_parution>
<first_prix>0 &euro;</first_prix>
</annonce>
<annonce>
.....
</annonces>
1)是否有可能將其導入MySQL和自動創建表?
2)我試圖與
LOAD XML INFILE '/datas/data.xml' INTO TABLE data;
ADN得到的結果
查詢OK,0行受到影響(0.00秒)記錄:0被刪:0跳過: 0警告:0
可能重複的問題http://stackoverflow.com/questions/5491056/how-to-import-xml-file-into-mysql-database-table-using-xml-load-function ?rq = 1 –
我已經使用這個代碼爲我的項目,所以我寫這個,並檢查此代碼也更確信.. –
呀但答案看起來完全相同。 –