2011-05-11 50 views

回答

0

好的。我还没有找到办法做到这一点,所以我创建了一个脚本,更新了我想要的元素。

Dim xml As Xml.XmlDocument 
Dim xpathTemplate As String 
Dim fname As String 

xpathTemplate = "/DTSConfiguration/Configuration[@Path='\Package.Variables[User::{0}].Properties[Value]']/ConfiguredValue" 
fname = "config.dtsConfig" 
xml = New Xml.XmlDocument() 
xml.Load(fname) 
xml.SelectSingleNode(String.Format(xpathTemplate, "myElement")).InnerText = "updated!" 
xml.Save(fname) 

因为我只是想更新一个字段,我用这种方法。