Hi, I have a simple issue while updating xml file but I'm not able to find the solution after trying many things out. I am trying to update password based on the username which is defined in just previous tag of password tag. My xml file is below:user1 pass1 user2 pass2 user3 pass3
Here, based on the username in tag I need to update password in tag. I have tried following but it's not working:
augeas {'Update external.xml':
incl => '/tmp/external.xml',
context => '/files/tmp/external.xml/ns2:tokens',
lens => "xml.lns",
changes => ["set /files/external.xml/token/[name/#text='user2'/name]/value/#text newpass2",]
}
Any idea?
↧