Ich bin dabei an example Beitrag von einem Mitglied zum Importieren von XML-Dateien in SQL Server geschrieben.Skript zum Importieren von XML-Datei in SQL Server
Allerdings habe ich einige Tags innerhalb eines Tags in meiner XML-Datei, wie unten gezeigt. Ich bin nicht sicher, zum Beispiel, wie man Referenz-Tags wie:
<foreign-keys>
<key app="EN" db-id="9d2tazta9vxatier92ovpfa9zw9vxvwxtarv">23</key>
</foreign-keys>
in meinem SQL-Skript, unten ist die XML-Beispieldatei I, mit denen ich zu tun enthält 3 Beobachtungen
<record>
<database name="PALEO-1.ENL" path="PALEO-1.ENL">PALEO-1.ENL</database>
<source-app name="EndNote" version="17.5">EndNote</source-app>
<rec-number>23</rec-number>
<foreign-keys>
<key app="EN" db-id="9d2tazta9vxatier92ovpfa9zw9vxvwxtarv">23</key>
</foreign-keys>
<ref-type name="Equation">39</ref-type>
<contributors></contributors>
<titles>
<title>
<style face="normal" font="default" size="100%">Boltzmann's Constant (k)</style>
</title>
</titles>
<dates></dates>
<image>
<style face="normal" font="default" size="100%">11982090273675629314boltz.gif</style>
</image>
<caption>
<style face="normal" font="default" size="100%">Boltzmann's Constant (k)</style>
</caption>
<notes>
<style face="normal" font="default" size="100%">The number that relates the average energy of a molecule to its absolute temperature. Boltzmann's constant is approximately 1.38×10</style>
<style face="superscript" font="default" size="100%">23</style>
<style face="normal" font="default" size="100%"> J/K (joules/kelvin).</style>
</notes>
<urls></urls>
</record>
<record>
<database name="PALEO-1.ENL" path="PALEO-1.ENL">PALEO-1.ENL</database><source-app name="EndNote" version="17.5">EndNote</source-app><rec-number>13</rec-number><foreign-keys><key app="EN" db-id="9d2tazta9vxatier92ovpfa9zw9vxvwxtarv">13</key></foreign-keys><ref-type name="Case">7</ref-type><contributors></contributors><titles><title><style face="normal" font="default" size="100%">Valdez v. Black</style></title><secondary-title><style face="normal" font="default" size="100%">F.2d</style></secondary-title></titles><pages><style face="normal" font="default" size="100%">1071</style></pages><volume><style face="normal" font="default" size="100%">446</style></volume><dates><year><style face="normal" font="default" size="100%">1971</style></year></dates><publisher><style face="normal" font="default" size="100%">10th Circ.</style></publisher><urls></urls></record>
<record>
<database name="PALEO-1.ENL" path="PALEO-1.ENL">PALEO-1.ENL</database><source-app name="EndNote" version="17.5">EndNote</source-app><rec-number>201</rec-number><foreign-keys><key app="EN" db-id="9d2tazta9vxatier92ovpfa9zw9vxvwxtarv">201</key></foreign-keys><ref-type name="Generic">13</ref-type><contributors></contributors><auth-address><style face="normal" font="default" size="100%">American Geophysical Union, 1909 K St. N.W., Washington, DC 20006</style></auth-address><titles><title><style face="normal" font="default" size="100%">Geophysical Research Letters</style></title><secondary-title><style face="normal" font="default" size="100%">Sedimentary Geology</style></secondary-title></titles><num-vols><style face="normal" font="default" size="100%">Vol. 1 (May 1974)-</style></num-vols><keywords><keyword><style face="normal" font="default" size="100%">Geophysics Periodicals</style></keyword><keyword><style face="normal" font="default" size="100%">Planets Periodicals</style></keyword><keyword><style face="normal" font="default" size="100%">Lunar geology Periodicals</style></keyword></keywords><dates><year><style face="normal" font="default" size="100%">1974</style></year></dates><pub-location><style face="normal" font="default" size="100%">Washington, D.C.</style></pub-location><publisher><style face="normal" font="default" size="100%">American Geophysical Union</style></publisher><isbn><style face="normal" font="default" size="100%">0094-8276</style></isbn><call-num><style face="normal" font="default" size="100%">QE500 .G37</style></call-num><notes><style face="normal" font="default" size="100%">Description based on: vol. 13, no. 4, Apr. 1986.
Semimonthly, 1992-
Monthly, -1991</style></notes><work-type><style face="normal" font="default" size="100%">serial</style></work-type><urls></urls></record>
Jede Hilfe zu dieser Adressierung Problem wird sehr geschätzt.
Sehr nette Antwort! [Hier finden Sie Informationen zu OpenXML und XQuery] (http://beyondrelational.com/quiz/sqlserver/general/2010/questions/sqlserver-quiz-general-2010-jacob-sebastian-openxml-or-xquery-when-and- why.aspx) – Shnugo
@Bistabil sieht vernünftig aus, danke ich werde das versuchen. –