Keep in mind I don't know which node, user[0], the user is in.
Find frank and change his password.
Code: Select all
<?xml version="1.0"?>
<members>
<user>
<name>frank</name>
<password>Any</password>
</user>
</members>
Solution:
Code: Select all
$matches = $xml->xpath('/members/user[name="frank"]');
$matches[0]->password = 'Whatever you want the new password to be';