문제

<?xml version="1.0" encoding="utf-8"?>
<Zones>
<database>User Id=myuser;Password=mypass;Data Source=xxxxxxx</database>
</Zones>

Is it possible to update the node value using xmlpoke and nant? My New Value

도움이 되었습니까?

해결책

You can make the entire value a NAnt property

<property name="db.string" value="User Id=${myID};Password=${myPW};Data Source=${MyDataSource}" />

Then use the xmlpoke command, something like:

 <xmlpoke file="${YourFilePath}\MyConfig.config" xpath="//Zones/database" value="${db.string}" />

Once it locates that node, it will update the value you specified in the property. NOTE: Not tested.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top