2017-04-08 27 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

相關問題