Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在xml源中设置映射时出错_Xml_Ssis_Xsd_Xsd Validation_Fpml - Fatal编程技术网

在xml源中设置映射时出错

在xml源中设置映射时出错,xml,ssis,xsd,xsd-validation,fpml,Xml,Ssis,Xsd,Xsd Validation,Fpml,我使用一个xml文件来读取包含多个名称空间的文件。我使用的是XSD文件。但这样说是错误的 "Error at Data Flow Task [XML Source [1]]: There was an error setting up the mapping. The '{http://www.fpml.org/2005/FpML-4-2}:header' element is not declared. (Microsoft Visual Studio)" 但是当我检查xsd文件时,它

我使用一个xml文件来读取包含多个名称空间的文件。我使用的是XSD文件。但这样说是错误的

"Error at Data Flow Task [XML Source [1]]: There was an error setting up the mapping. 
 The '{http://www.fpml.org/2005/FpML-4-2}:header' element is not declared.
 (Microsoft Visual Studio)"
但是当我检查xsd文件时,它包含了该文件的定义

我的档案如下

 <?xml version="1.0" encoding="UTF-8"?>
 <xs:schema xmlns="http://link"  
            xmlns:ns1="http://link2" 
            xmlns:ns2="http://link"  
            xmlns:xs="http://www.w3.org/2001/XMLSchema"  
            targetNamespace="http://targetnamaspace">

   <xs:import namespace="http://link"  schemaLocation="XmlPositions1.xsd"/>
   <xs:import namespace="http://link2" schemaLocation="XmlPositions2.xsd"/>

我的xml文件如下所示

 <?xml version="1.0" encoding="utf-8"?>
 <ns0:message xmlns:ns0="http://target" version="4-2"  
              xmlns:ns1="http://link2" 
              xmlns:ns2="http://link"  
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xsi:type="ns0:SoaMethodsResult">
      <ns1:header>
         <ns1:messageId messageIdScheme=""></ns1:messageId>
         <ns1:sentBy partyIdScheme="http://reference">SOPHIS</ns1:sentBy>
         <ns1:creationTimestamp>2014-03-21T22:20:40+01:00</ns1:creationTimestamp>

索菲斯
2014-03-21T22:20:40+01:00
如果你有任何问题,请告诉我。
谢谢你帮助我

其中是模式文档的一部分,您可以在其中为命名空间导入模式文档
http://www.fpml.org/2005/FpML-4-2

如果有这样一个部件,它就不工作了(但因为您没有向我们展示它,这里没有人能告诉您为什么它不工作)


如果没有这样的部分,您的问题是您没有导入该名称空间。

根据名称空间和sentby部分中的文本SOPHIS判断,我猜这是SOPHIS Risque(或Value)fpml。Sophis提供的XML模式是出了名的不完整,这可能是您拒绝的原因。我似乎记得必须稍微“调整”它们才能让它们正常工作。祝您好运

请添加XML模式的相关部分,并包含实例和XSD的完整标题。该错误表示未声明命名空间限定标头元素。如果不知道名称空间是link、link2、target还是您使用的任何伪造名称空间,就无法提供帮助。名称空间是相关的。编辑您的问题并添加此信息。您好,谢谢您的回复。是的,XSD文件的格式不好。现在没有错误了。但我仍然无法导入数据,我的意思是行是emty,因为xml源显示xml文件中存在的所有表。但解析的数据为空。程序执行,不产生任何行