Xml Type ...未声明,或者不是简单类型

时间:2016-08-29 06:49:56

标签: c# xml xsd

我从Xero获取xml架构:https://github.com/XeroAPI/XeroAPI-Schemas

.count

架构是项目中的嵌入式资源。当我尝试做schemaSet.Add(schema)时;我总是得到" Type' entityValidationStatus'未声明,或不是简单类型"。以下是我的架构:

var assembly = Assembly.GetExecutingAssembly();
            var stream = assembly.GetManifestResourceStream("XeroConnector.XmlSchemas." + selectedEndPoint.Schema + ".xsd");

            using (var reader = XmlReader.Create(stream))
            {
                schema = XmlSchema.Read(reader, null);
            }

            schemaSet.Add(schema);

0 个答案:

没有答案
相关问题