Update XML Document
I want to update an XML Document with the node <ConfiguredValue>
where Path="\Package.Variables[User::LastRunDate].Properties[Value]" ValueType="DateTime">
Can somebody please share some code to update XML document with desired node?
<?xml version="1.0"?>
<DTSConfiguration>
<DTSConfigurationHeading>
<DTSConfigurationFileInfo GeneratedBy="contoso\johnR" GeneratedFromPackageName="UserPrefUtility" GeneratedFromPackageID="{E8B9B96A-7A1F-4DE9-9814-0B9F290CF021}" GeneratedDate="10/25/2010 4:15:43 PM"/>
</DTSConfigurationHeading>
<Configuration ConfiguredType="Property" Path="\Package.Connections[HYDCRMTRN01.InsphereModelTest_Custom].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>Data Source=contoso;Initial Catalog=contosodb;Provider=SQLNCLI10.1;Integrated Security=SSPI;Application Name=SSIS-UserPrefUtility-{0E1E1762-E9E4-453E-8D4A-3760E77292B3}contoso.contosodb;Auto Translate=False;</ConfiguredValue>
</Configuration>
<Configuration ConfiguredType="Property" Path="\Package.Variables[User::CreateLogs].Properties[Value]" ValueType="String">
<ConfiguredValue>true</ConfiguredValue>
</Configuration>
**<Configuration ConfiguredType="Property" Path="\Package.Variables[User::LastRunDate].Properties[Value]" ValueType="DateTime">
<ConfiguredValue>1/15/2012 2:32:00 AM</ConfiguredValue>
</Configuration>**
<Configuration ConfiguredType="Property开发者_运维问答" Path="\Package.Variables[User::SdkUrl].Properties[Value]" ValueType="String">
<ConfiguredValue>http://contoso/MSCrmServices/2007/CrmService.asmx</ConfiguredValue>
</Configuration>
</DTSConfiguration>
emacs document.xml
( honestly, without more context to the question -- do you want to modify the document with xslt or using Java/DOM or whatever -- that's as good an answer as any. )
精彩评论