我很难用XSD将下面的XML文件加载到使用SSIS的SQL数据库中。该文件的示例如下,我正在尝试事件数据(SerialNumber,Filename ....)。
<?xml version="1.0" encoding="UTF-8"?>
<Event>
<FileVersion>8.0</FileVersion>
<EventType>Full Waveform</EventType>
<SerialNumber>MP13531</SerialNumber>
<Version>V 10-73 Minimate Pro 4</Version>
<FileName>MP13531_20150709124825.IDFW</...
<EventTime>12:48:25</EventTime>
<EventDate>2015-07-09</EventDate>
<Channels>
<Channel>Tran</Channel>
<Channel>Vert</Channel>
<Channel>Long</Channel>
</Channels>
</Event>
这是我的Generated XSD,但是在SSIS中我只看到了Channels元素。
<?xml version="1.0"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Event" >
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="FileVersion" type="xs:string"/>
<xs:element minOccurs="0" name="EventType" type="xs:string" />
<xs:element minOccurs="0" name="SerialNumber" type="xs:string" />
<xs:element minOccurs="0" name="Version" type="xs:string" />
<xs:element minOccurs="0" name="FileName" type="xs:string" />
<xs:element minOccurs="0" name="EventTime" type="xs:time" />
<xs:element minOccurs="0" name="EventDate" type="xs:date" />
<xs:element minOccurs="0" name="Channels">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Channel" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>