何我用Signature读取xml架构? [英] Ho do I read an xml schema with Signature?
问题描述
您好我必须阅读xsd才能在数据集上创建xml结构。
当我这样做时
Hi I have to read an xsd for create the xml structure on a dataset.
when I do
Dim Dati_xml As New DataSet
Dati_xml.ReadXmlSchema("xsdpath")
我收到此错误
Element'http://www.w3 .org / 2000/09 / xmldsig#:签名'未申报。
你能帮助我吗?
谢谢你是
这是xsd的标题
I get this error
Element 'http://www.w3.org/2000/09/xmldsig#:Signature' is not declared.
Can you help me?
thank you
this is the header of the xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.fatturapa.gov.it/sdi/fatturapa/v1.1" targetNamespace="http://www.fatturapa.gov.it/sdi/fatturapa/v1.1" version="1.1">
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
我已经明白这个问题与xml签名有关。
In xsd我有另一个xsd引用的元素签名
这是xsd架构的链接
[ ^ ]
任何帮助?
I had understood that this problem is related with the xml signature.
In the xsd i have the element signature that is referenced in another xsd
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemalocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd" xmlns:xs="#unknown">
this is the link of the xsd schema
[^]
any help?
推荐答案
您没有提供足够的信息来帮助您。因此,我们只能参考类似的问题和答案,这些问题和答案可能有助于您找到解决问题的方法:
验证XML的签名元素对XSD 失败
使用XSD验证签名的XML - xmldsig
You did not provide enough information to help you. So, we can only refer to similar questions and answers which may help you to find a way to resolve your issue:
Validating Signature element of XML fails against XSD
Validate signed XML with XSD - xmldsig
不是解决方案,但一个pragamtic解决方法继续工作。
我远离成为这方面的专家,但我的鼓励告诉我删除这个签名事情,所以我删除了这一行:
Not the solution, but a "pragamtic workaround" to proceed work.
I'm far away from be an expert on this, but my inspration told me to remove this "signature things", so I removed the line:
<xs:element ref="ds:Signature" minOccurs="0" />
看看...将创建DataSet,我可以显示表格。
所以至少你可以继续编码和并行,你可以搜索上面的清洁解决方案。
我不知道我在做什么,但我做得很好:)
问候
And see... the DataSet will be created and I can Display the tables.
So at least you can go on with coding and parallel you can search for a clean solution of the above.
I don't know what I'm doing, but I'm doing it good :)
Regards
您错过了代码中的.xsd或.x扩展名。它应该像
You missed .xsd or.xml extension in the code. It should be like
Dim Dati_xml As DataSet = New DataSet
Dati_xml.ReadXmlSchema("xsdpath.xsd")
更多参考此处: https://msdn.microsoft.com/en-us/library/atchhx4f(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1 [ ^ ]
这篇关于何我用Signature读取xml架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!