我想加入这些表
select * from sys.xml_schema_collections
select * from sys.xml_schema_elements
SELECT * FROM sys.xml_schema_types
我可以连接前两个,但是将元素类型连接到元素时会发生问题,因为xml_component_id不匹配。您认为可能是什么问题? XSD文件错误?
这里是一个样本。
<xsd:element name="UniversalInterchange">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:sequence>
<xsd:element name="Header">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:sequence>
<xsd:element name="SenderID" type="xsd:string" />
<xsd:element name="RecipientID" type="xsd:string" />
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="Body">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:sequence>
<xsd:any processContents="skip" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="version" type="xsd:token" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>