我想驗證針對其模式定義一個數字簽名的XML,而這個模式實際上包含這個標籤無法驗證針對多個XSD架構在C#
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd" id="schema"/>
然後我試圖加載模式:
XmlReaderSettings settings = new XmlReaderSettings();
settings.Schemas.Add(null, "a.xsd");
settings.Schemas.Compile();
我將得到以下錯誤 'http://www.w3.org/2000/09/xmldsig#:Signature'元素未被聲明。
貴XML像XMLSPY工具驗證? 如果我沒有記錯,您應該能夠使用XmlReader對導入/包含模式進行驗證。 – thijs 2009-10-16 09:57:31