什麼是進口/這種XML的轉換成SQL數據庫的正確,最有效的方法:XML到SQL - 行有列沒有唯一的標識符
<?xml version="1.0" encoding="UTF-8"?>
<data app-version-major="xyz" app-version-minor="xyz" app-version-build="xyz" schema-version="xyz" export-time="xyz" db-product-name="Apache Derby" db-product-version="xyz">
<table name="table1" entire="Y">
<columns>
<column name="col1" class="java.lang.Long" type-id="-5" db-type="bigint"/>
<column name="col2" class="java.lang.String" length="10" type-id="12" db-type="varchar"/>
<column name="col3" class="java.lang.String" length="255" type-id="12" db-type="varchar"/>
<column name="col4" class="java.lang.Double" type-id="8" db-type="double"/>
<column name="col5" class="java.lang.String" length="1" type-id="1" db-type="char"/>
<column name="col6" class="java.lang.Double" type-id="8" db-type="double"/>
<column name="col7" class="java.lang.String" length="50" type-id="12" db-type="varchar"/>
<column name="col8" class="java.lang.String" length="1" type-id="1" db-type="char"/>
<column name="col9" class="java.lang.String" length="2000" type-id="12" db-type="varchar"/>
<column name="col11" class="java.lang.String" length="1" type-id="1" db-type="char"/>
<column name="col12" class="java.sql.Timestamp" type-id="93" db-type="timestamp"/>
<column name="col13" class="java.sql.Timestamp" type-id="93" db-type="timestamp"/>
<column name="col14" class="java.lang.String" length="50" type-id="12" db-type="varchar"/>
<column name="col15" class="java.sql.Timestamp" type-id="93" db-type="timestamp"/>
<column name="col16" class="java.lang.String" length="50" type-id="12" db-type="varchar"/>
<column name="col17" class="java.lang.Long" type-id="-5" db-type="bigint"/>
<column name="col18" class="java.lang.String" length="255" type-id="12" db-type="varchar"/>
<column name="col19" class="java.lang.String" length="255" type-id="12" db-type="varchar"/>
<column name="col20" class="java.lang.String" length="255" type-id="12" db-type="varchar"/>
<column name="col21" class="java.lang.String" length="1" type-id="1" db-type="char"/>
<column name="col22" class="java.sql.Timestamp" type-id="93" db-type="timestamp"/>
<column name="col23" class="java.lang.String" length="20" type-id="12" db-type="varchar"/>
<column name="col24" class="java.lang.String" length="20" type-id="12" db-type="varchar"/>
<column name="col25" class="java.lang.String" length="50" type-id="12" db-type="varchar"/>
<column name="col26" class="java.lang.Long" type-id="-5" db-type="bigint"/>
</columns>
<row>
<v>value1</v>
<v>value2</v>
<v>value3</v>
<v>value4</v>
<v>value5</v>
<v>value6</v>
<v>value7</v>
<v>value8</v>
<v>value9</v>
<v>value10</v>
<v>value11</v>
<v>value12</v>
<v>value13</v>
<v>value14</v>
<v>value15</v>
<v>value16</v>
<v>value17</v>
<v>value18</v>
<v>value19</v>
<v>value20</v>
<v>value21</v>
<v>value22</v>
<v>value23</v>
<v>value24</v>
<v>value25</v>
</row>
<row>
<v>value1</v>
<v>value2</v>
<v>value3</v>
<v>value4</v>
<v>value5</v>
<v>value6</v>
<v>value7</v>
<v>value8</v>
<v>value9</v>
<v>value10</v>
<v>value11</v>
<v>value12</v>
<v>value13</v>
<v>value14</v>
<v>value15</v>
<v>value16</v>
<v>value17</v>
<v>value18</v>
<v>value19</v>
<v>value20</v>
<v>value21</v>
<v>value22</v>
<v>value23</v>
<v>value24</v>
<v>value25</v>
</row>
</table>
目前實驗已在SQL Express ,試圖找到一種方法來獲取<row>
標籤中的信息以更正列(row1-> col1-> value1等)。
我試過了下面這個指南:https://www.mssqltips.com/sqlservertip/2899/importing-and-processing-data-from-xml-files-into-sql-server-tables/ - 但我被卡在行內選擇了「匿名」列數據 - 我得到的只是空值。
我也試着運行幾個XML到CSV轉換器沒有運氣。這將是怎樣的呢?
結構是否總是相同或必須處理不同的XML數據? – Shnugo