我正在尝试使用 SSIS 将数据从 xml 文件加载到 sql 表。在 xml 源适配器上,我不断收到 XML 源适配器不支持复杂类型的混合内容模型。任何帮助表示赞赏。
这是 xml 和 xsd(注意我编辑了一些数据,以便它适合此消息):
编辑:xml链接:http ://sdrv.ms/11KcWas
<?xml version="1.0"?>
<dwml version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">
<head>
<product srsName="WGS 1984" concise-name="time-series" operational-mode="official">
<title>NOAA's National Weather Service Real Time Mesoscale Analysis And Forecast Data</title>
<field>meteorological</field>
<category>analysis and forecast</category>
<creation-date refresh-frequency="PT1H">2013-06-06T19:26:37Z</creation-date>
</product>
<source>
<more-information>http://products.weather.gov/search.php</more-information>
<production-center>Meteorological Development Laboratory<sub-center>Product Generation Branch</sub-center></production-center>
<disclaimer>http://www.nws.noaa.gov/disclaimer.html</disclaimer>
<credit>http://www.weather.gov/</credit>
<credit-logo>http://www.weather.gov/images/xml_logo.gif</credit-logo>
<feedback>http://www.weather.gov/feedback.php</feedback>
</source>
</head>
<data>
<location>
<location-key>point1</location-key>
<point latitude="45.00" longitude="-105.00"/>
</location>
<moreWeatherInformation applicable-location="point1">http://forecast.weather.gov/MapClick.php?textField1=45.00&textField2=-105.00</moreWeatherInformation>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p24h-n3-1</layout-key>
<start-valid-time>2013-06-06T08:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-06T20:00:00-06:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p24h-n2-2</layout-key>
<start-valid-time>2013-06-06T20:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-07T09:00:00-06:00</end-valid-time>
<start-valid-time>2013-06-07T20:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-08T09:00:00-06:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p12h-n5-3</layout-key>
<start-valid-time>2013-06-06T06:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-06T18:00:00-06:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p3h-n17-4</layout-key>
<start-valid-time>2013-06-06T15:00:00-06:00</start-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p6h-n9-5</layout-key>
<start-valid-time>2013-06-06T12:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-06T18:00:00-06:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p6h-n5-6</layout-key>
<start-valid-time>2013-06-06T12:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-06T18:00:00-06:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p1h-n49-7</layout-key>
<start-valid-time>2013-06-06T15:00:00-06:00</start-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p24h-n3-8</layout-key>
<start-valid-time>2013-06-06T12:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-07T06:00:00-06:00</end-valid-time>
<start-valid-time>2013-06-07T06:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-08T06:00:00-06:00</end-valid-time>
<start-valid-time>2013-06-08T06:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-09T06:00:00-06:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p24h-n1-9</layout-key>
<start-valid-time>2013-06-06T10:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-07T06:00:00-06:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p24h-n2-10</layout-key>
<start-valid-time>2013-06-07T06:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-08T06:00:00-06:00</end-valid-time>
<start-valid-time>2013-06-08T06:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-09T06:00:00-06:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p1m-n1-11</layout-key>
<start-valid-time>2013-05-31T18:00:00-06:00</start-valid-time>
<end-valid-time>2013-06-30T18:00:00-06:00</end-valid-time>
</time-layout>
<time-layout time-coordinate="local" summarization="none">
<layout-key>k-p3m-n1-12</layout-key>
<start-valid-time>2013-05-31T18:00:00-06:00</start-valid-time>
<end-valid-time>2013-08-31T18:00:00-06:00</end-valid-time>
</time-layout>
<parameters applicable-location="point1">
<temperature type="maximum" units="Fahrenheit" time-layout="k-p24h-n3-1">
<name>Daily Maximum Temperature</name>
<value>73</value>
<value>79</value>
<value>72</value>
</temperature>
<temperature type="minimum" units="Fahrenheit" time-layout="k-p24h-n2-2">
<name>Daily Minimum Temperature</name>
<value>51</value>
<value>56</value>
</temperature>
<temperature type="hourly" units="Fahrenheit" time-layout="k-p3h-n17-4">
<name>Temperature</name>
<value>72</value>
<value>71</value>
<value>63</value>
<value>57</value>
<value>53</value>
<value>52</value>
<value>67</value>
<value>76</value>
<value>78</value>
<value>77</value>
<value>69</value>
<value>63</value>
<value>59</value>
<value>56</value>
<value>67</value>
<value>68</value>
<value>72</value>
</temperature>
<temperature type="dew point" units="Fahrenheit" time-layout="k-p3h-n17-4">
<name>Dew Point Temperature</name>
<value>43</value>
<value>42</value>
<value>44</value>
<value>46</value>
<value>46</value>
<value>46</value>
<value>47</value>
<value>47</value>
<value>46</value>
<value>46</value>
<value>48</value>
<value>49</value>
<value>49</value>
<value>48</value>
<value>47</value>
<value>45</value>
<value>44</value>
</temperature>
<precipitation type="liquid" units="inches" time-layout="k-p6h-n9-5">
<name>Liquid Precipitation Amount</name>
<value>0.00</value>
<value>0.00</value>
<value>0.00</value>
<value>0.00</value>
<value>0.01</value>
<value>0.02</value>
<value>0.01</value>
<value>0.00</value>
<value>0.00</value>
</precipitation>
<wind-speed type="sustained" units="knots" time-layout="k-p3h-n17-4">
<name>Wind Speed</name>
<value>5</value>
<value>7</value>
<value>6</value>
<value>5</value>
<value>6</value>
<value>7</value>
<value>7</value>
<value>7</value>
<value>5</value>
<value>4</value>
<value>6</value>
<value>9</value>
<value>11</value>
<value>10</value>
<value>15</value>
<value>18</value>
<value>16</value>
</wind-speed>
<direction type="wind" units="degrees true" time-layout="k-p3h-n17-4">
<name>Wind Direction</name>
<value>340</value>
<value>10</value>
<value>100</value>
<value>190</value>
<value>180</value>
<value>180</value>
<value>200</value>
<value>220</value>
<value>220</value>
<value>220</value>
<value>230</value>
<value>230</value>
<value>260</value>
<value>280</value>
<value>300</value>
<value>310</value>
<value>310</value>
</direction>
<cloud-amount type="total" units="percent" time-layout="k-p3h-n17-4">
<name>Cloud Cover Amount</name>
<value>25</value>
<value>37</value>
<value>36</value>
<value>35</value>
<value>36</value>
<value>37</value>
<value>42</value>
<value>47</value>
<value>57</value>
<value>67</value>
<value>66</value>
<value>65</value>
<value>61</value>
<value>57</value>
<value>58</value>
<value>50</value>
<value>49</value>
</cloud-amount>
<water-state time-layout="k-p6h-n9-5">
<waves type="significant" units="feet">
<name>Wave Height</name>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
</waves>
</water-state>
<precipitation type="snow" units="inches" time-layout="k-p6h-n5-6">
<name>Snow Amount</name>
<value>0.00</value>
<value>0.00</value>
<value>0.00</value>
<value>0.00</value>
<value>0.00</value>
</precipitation>
<precipitation type="ice" units="inches" time-layout="k-p6h-n5-6">
<name>Ice Accumulation</name>
<value>0.00</value>
<value>0.00</value>
<value>0.00</value>
<value>0.00</value>
<value>0.00</value>
</precipitation>
<probability-of-precipitation type="12 hour" units="percent" time-layout="k-p12h-n5-3">
<name>12 Hourly Probability of Precipitation</name>
<value>2</value>
<value>6</value>
<value>18</value>
<value>30</value>
<value>13</value>
</probability-of-precipitation>
<wind-speed type="cumulative64" units="percent" time-layout="k-p6h-n9-5">
<name>Probability of a Tropical Cyclone Wind Speed above 64 Knots (Cumulative)</name>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
<value xsi:nil="true"/>
</wind-speed>
<fire-weather type="risk from wind and relative humidity" time-layout="k-p24h-n3-8">
<name>Fire Weather Outlook from Wind and Relative Humidity</name>
<value>No Areas</value>
<value>No Areas</value>
<value>No Areas</value>
</fire-weather>
<fire-weather type="risk from dry thunderstorms" time-layout="k-p24h-n2-2">
<name>Fire Weather Outlook from Dry Thunderstorms</name>
<value>No Areas</value>
<value>No Areas</value>
</fire-weather>
<convective-hazard>
<outlook time-layout="k-p24h-n3-8">
<name>Convective Hazard Outlook</name>
<value>No Thunderstorms</value>
<value>General Thunderstorms</value>
<value>General Thunderstorms</value>
</outlook>
</convective-hazard>
<convective-hazard>
<severe-component type="tornadoes" units="percent" time-layout="k-p24h-n1-9">
<name>Probability of Tornadoes</name>
<value>0</value>
</severe-component>
</convective-hazard>
<convective-hazard>
<severe-component type="hail" units="percent" time-layout="k-p24h-n1-9">
<name>Probability of Hail</name>
<value>0</value>
</severe-component>
</convective-hazard>
<convective-hazard>
<severe-component type="damaging thunderstorm winds" units="percent" time-layout="k-p24h-n1-9">
<name>Probability of Damaging Thunderstorm Winds</name>
<value>0</value>
</severe-component>
</convective-hazard>
<convective-hazard>
<severe-component type="extreme tornadoes" units="percent" time-layout="k-p24h-n1-9">
<name>Probability of Extreme Tornadoes</name>
<value>0</value>
</severe-component>
</convective-hazard>
<convective-hazard>
<severe-component type="extreme hail" units="percent" time-layout="k-p24h-n1-9">
<name>Probability of Extreme Hail</name>
<value>0</value>
</severe-component>
</convective-hazard>
<convective-hazard>
<severe-component type="extreme thunderstorm winds" units="percent" time-layout="k-p24h-n1-9">
<name>Probability of Extreme Thunderstorm Winds</name>
<value>0</value>
</severe-component>
</convective-hazard>
<convective-hazard>
<severe-component type="severe thunderstorms" units="percent" time-layout="k-p24h-n2-10">
<name>Total Probability of Severe Thunderstorms</name>
<value>0</value>
<value>0</value>
</severe-component>
</convective-hazard>
<convective-hazard>
<severe-component type="extreme severe thunderstorms" units="percent" time-layout="k-p24h-n2-10">
<name>Total Probability of Extreme Severe Thunderstorms</name>
<value>0</value>
<value>0</value>
</severe-component>
</convective-hazard>
<climate-anomaly>
<monthly type="average temperature above normal" units="percent" time-layout="k-p1m-n1-11">
<name>Probability of One-Month Average Temperature Above Normal</name>
<value>33</value>
</monthly>
</climate-anomaly>
<climate-anomaly>
<monthly type="average temperature below normal" units="percent" time-layout="k-p1m-n1-11">
<name>Probability of One-Month Average Temperature Below Normal</name>
<value>33</value>
</monthly>
</climate-anomaly>
<climate-anomaly>
<monthly type="average precipitation above normal" units="percent" time-layout="k-p1m-n1-11">
<name>Probability of One-Month Average Precipitation Above Normal</name>
<value>34</value>
</monthly>
</climate-anomaly>
<climate-anomaly>
<monthly type="average precipitation below normal" units="percent" time-layout="k-p1m-n1-11">
<name>Probability of One-Month Average Precipitation Below Normal</name>
<value>33</value>
</monthly>
</climate-anomaly>
<climate-anomaly>
<seasonal type="average temperature above normal" units="percent" time-layout="k-p3m-n1-12">
<name>Probability of Three-Month Average Temperature Above Normal</name>
<value>39</value>
</seasonal>
</climate-anomaly>
<climate-anomaly>
<seasonal type="average temperature below normal" units="percent" time-layout="k-p3m-n1-12">
<name>Probability of Three-Month Average Temperature Below Normal</name>
<value>27</value>
</seasonal>
</climate-anomaly>
<climate-anomaly>
<seasonal type="average precipitation above normal" units="percent" time-layout="k-p3m-n1-12">
<name>Probability of Three-Month Average Precipitation Above Normal</name>
<value>33</value>
</seasonal>
</climate-anomaly>
<hazards time-layout="k-p1h-n49-7">
<name>Watches, Warnings, and Advisories</name>
</hazards>
<wind-speed type="incremental34" units="percent" time-layout="k-p6h-n9-5">
<name>Probability of a Tropical Cyclone Wind Speed above 34 Knots (Incremental)</name>
</wind-speed>
<wind-speed type="incremental50" units="percent" time-layout="k-p6h-n9-5">
<name>Probability of a Tropical Cyclone Wind Speed above 50 Knots (Incremental)</name>
</wind-speed>
<wind-speed type="incremental64" units="percent" time-layout="k-p6h-n9-5">
<name>Probability of a Tropical Cyclone Wind Speed above 64 Knots (Incremental)</name>
</wind-speed>
<wind-speed type="cumulative34" units="percent" time-layout="k-p6h-n9-5">
<name>Probability of a Tropical Cyclone Wind Speed above 34 Knots (Cumulative)</name>
</wind-speed>
<wind-speed type="cumulative50" units="percent" time-layout="k-p6h-n9-5">
<name>Probability of a Tropical Cyclone Wind Speed above 50 Knots (Cumulative)</name>
</wind-speed>
<humidity type="relative" units="percent" time-layout="k-p3h-n17-4">
<name>Relative Humidity</name>
<value>35</value>
<value>35</value>
<value>50</value>
<value>66</value>
<value>77</value>
<value>80</value>
<value>49</value>
<value>36</value>
<value>32</value>
<value>33</value>
<value>47</value>
<value>60</value>
<value>69</value>
<value>74</value>
<value>49</value>
<value>44</value>
<value>37</value>
</humidity>
<temperature type="apparent" units="Fahrenheit" time-layout="k-p3h-n17-4">
<name>Apparent Temperature</name>
<value>72</value>
<value>71</value>
<value>63</value>
<value>57</value>
<value>53</value>
<value>52</value>
<value>67</value>
<value>76</value>
<value>78</value>
<value>77</value>
<value>69</value>
<value>63</value>
<value>59</value>
<value>56</value>
<value>67</value>
<value>68</value>
<value>72</value>
</temperature>
<wind-speed type="gust" units="knots" time-layout="k-p3h-n17-4">
<name>Wind Speed Gust</name>
<value>6</value>
<value>7</value>
<value>6</value>
<value>5</value>
<value>6</value>
<value>7</value>
<value>8</value>
<value>7</value>
<value>6</value>
<value>5</value>
<value>6</value>
<value>9</value>
<value>16</value>
<value>14</value>
<value>21</value>
<value>25</value>
<value>22</value>
</wind-speed>
<weather time-layout="k-p3h-n17-4">
<name>Weather Type, Coverage, and Intensity</name>
<value coverage="slight chance" intensity="none" weather-type="thunderstorms" qualifier="none">
<visibility xsi:nil="true"/>
</value>
<value coverage="slight chance" intensity="light" additive="and" weather-type="rain showers" qualifier="none">
<visibility xsi:nil="true"/>
</value>
</weather-conditions>
<weather-conditions>
<value coverage="slight chance" intensity="none" weather-type="thunderstorms" qualifier="none">
<visibility xsi:nil="true"/>
</value>
<value coverage="slight chance" intensity="light" additive="and" weather-type="rain showers" qualifier="none">
<visibility xsi:nil="true"/>
</value>
</weather-conditions>
<weather-conditions>
<value coverage="chance" intensity="none" weather-type="thunderstorms" qualifier="none">
<visibility xsi:nil="true"/>
</value>
<value coverage="chance" intensity="light" additive="and" weather-type="rain showers" qualifier="none">
<visibility xsi:nil="true"/>
</value>
</weather-conditions>
<weather-conditions>
<value coverage="chance" intensity="none" weather-type="thunderstorms" qualifier="none">
<visibility xsi:nil="true"/>
</value>
<value coverage="chance" intensity="light" additive="and" weather-type="rain showers" qualifier="none">
<visibility xsi:nil="true"/>
</value>
</weather-conditions>
<weather-conditions>
<value coverage="slight chance" intensity="none" weather-type="thunderstorms" qualifier="none">
<visibility xsi:nil="true"/>
</value>
<value coverage="slight chance" intensity="light" additive="and" weather-type="rain showers" qualifier="none">
<visibility xsi:nil="true"/>
</value>
</weather-conditions>
<weather-conditions>
<value coverage="slight chance" intensity="none" weather-type="thunderstorms" qualifier="none">
<visibility xsi:nil="true"/>
</value>
<value coverage="slight chance" intensity="light" additive="and" weather-type="rain showers" qualifier="none">
<visibility xsi:nil="true"/>
</value>
</weather-conditions>
<weather-conditions/>
<weather-conditions/>
<weather-conditions/>
<weather-conditions/>
</weather>
<conditions-icon type="forecast-NWS" time-layout="k-p3h-n17-4">
<name>Conditions Icons</name>
</conditions-icon>
<climate-anomaly>
<seasonal type="average precipitation below normal" units="percent" time-layout="k-p3m-n1-12">
<name>Probability of Three-Month Average Precipitation Below Normal</name>
<value>33</value>
</seasonal>
</climate-anomaly>
</parameters>
</data>
</dwml>
<!--
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="http://graphical.weather.gov/xml/DWMLgen/schema/meta_data.xsd"/>
<xsd:include schemaLocation="http://graphical.weather.gov/xml/DWMLgen/schema/ndfd_data.xsd"/>
<xsd:simpleType name="latLonListType">
<xsd:restriction base="xsd:string">
<xsd:annotation>
<xsd:documentation xml:lang="en">
This expression enforces a space delimited list of latitude longitude pairs. The latitude and longitude values are delimited by a comma (i.e. 38.00,-100.00 40.00,-78.00)
</xsd:documentation>
</xsd:annotation>
<xsd:pattern value="[\-]?\d{1,2}\.\d+,[\-]?\d{1,3}\.\d+( [\-]?\d{1,2}\.\d+,[\-]?\d{1,3}\.\d+)*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="cityNameListType">
<xsd:restriction base="xsd:string">
<xsd:annotation>
<xsd:documentation xml:lang="en">
This expression enforces a coma delimited list city names. The city names are ordered to match the cities latitude and longitude value in the accompanying latLonListType element (i.e. Dallas,Los Angeles,Salt Lake City)
</xsd:documentation>
</xsd:annotation>
<xsd:pattern value="[a-zA-Z'\-]*( ?[a-zA-Z'\-]*)*,[A-Z][A-Z](\|[a-zA-Z'\-]*( ?[a-zA-Z'\-]*)*,[A-Z][A-Z])*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="dwml">
<xsd:complexType>
<xsd:choice>
<xsd:sequence>
<xsd:element name="head" type="headType" minOccurs="1" maxOccurs="1"/>
<xsd:element name="data" type="dataType" minOccurs="1" maxOccurs="unbounded">
<xsd:keyref name="applicable-locationKey" refer="locationKey">
<xsd:selector xpath="data/parameters"/>
<xsd:field xpath="@applicable-location"/>
</xsd:keyref>
<xsd:keyref name="moreWeatherInformationKey" refer="locationKey">
<xsd:selector xpath="data/moreWeatherInformation"/>
<xsd:field xpath="@applicable-location"/>
</xsd:keyref>
<xsd:keyref name="applicable-timeKey" refer="timeKey">
<xsd:selector xpath="data/parameters/*"/>
<xsd:field xpath="@time-layout"/>
</xsd:keyref>
<xsd:keyref name="applicable-categoriesKey" refer="categoriesKey">
<xsd:selector xpath="data/parameters/*"/>
<xsd:field xpath="@applicable-categories"/>
</xsd:keyref>
<xsd:key name="locationKey">
<xsd:selector xpath=".//location"/>
<xsd:field xpath="location-key"/>
</xsd:key>
<xsd:key name="timeKey">
<xsd:selector xpath=".//time-layout"/>
<xsd:field xpath="layout-key"/>
</xsd:key>
<xsd:key name="categoriesKey">
<xsd:selector xpath=".//categories"/>
<xsd:field xpath="categories-key"/>
</xsd:key>
</xsd:element>
</xsd:sequence>
<xsd:sequence>
<xsd:element name="minResolution" type="xsd:decimal" minOccurs="0" maxOccurs="1"/>
<xsd:element name="latLonList" type="latLonListType"/>
<xsd:element name="cityNameList" type="cityNameListType" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:choice>
<xsd:attribute name="version" type="xsd:string" default="1.0"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>