2017-04-08 30 views

回答

1

的主要问题是,你从Web服务传递XML作为字符串(不推荐)

你必须改变Web方法返回一个XmlDocument,加载格式良好的XML并将其传回SSIS。

或者你也可以做一个小的解决方法是保存XML文件后运行一个脚本,并与<&gt;>

有用的链接

+0

谢谢哈迪,我在这个方法有趣:http://stackoverflow.com/questions/5006020/decode-xml-returned-by-a-webservice-and-are-replaced-with-lt - 和 - gt。如果你可以在这里提供一些例子,会很好。 – Key

0

同样的使用脚本任务选项

Dim fileFirst As String = Dts.Variables("User::FullFilePath").Value.ToString() 
    File.WriteAllText(fileFirst, File.ReadAllText(fileFirst).Replace("&lt;", "<")) 

    Dim fileSecond As String = Dts.Variables("User::FullFilePath").Value.ToString() 
    File.WriteAllText(fileSecond, File.ReadAllText(fileSecond).Replace("&gt;", ">")) 

    Dim fileThird As String = Dts.Variables("User::FullFilePath").Value.ToString() 
    File.WriteAllText(fileThird, File.ReadAllText(fileThird).Replace("&amp;", "&")) 

    Dim fileFour As String = Dts.Variables("User::FullFilePath").Value.ToString() 
    File.WriteAllText(fileFour, File.ReadAllText(fileFour).Replace("&quot;", "\")) 

    Dim fileFive As String = Dts.Variables("User::FullFilePath").Value.ToString() 
    File.WriteAllText(fileFive, File.ReadAllText(fileFive).Replace("&apos;", "'")) 

一个 - > VB

相关问题