我正在尝试使用 XmlSchema.Read 加载 xsd 文件。它运行没有错误,我可以看到它从文件中读取命名空间,但我无法从 xsd 文件中读取任何其他数据。
这是我的代码:
public XmlSchema GetXSDFileAsXMLSchema()
{
FileStream fs = new FileStream(path, FileMode.Open);
XmlSchema schema = XmlSchema.Read(fs, new ValidationEventHandler(ValidationCallBack));
return schema;
}
private void ValidationCallBack(object sender, ValidationEventArgs args)
{
return;
}
Run Code Online (Sandbox Code Playgroud)
有人知道为什么元素数是0吗?