agam360 -1 Light Poster

Hello,
I have a php code that can find a child node in my xml file, And my problem is that I want to delete the specific user when I find the child node.
How can I implement it here?

mail-list.xml:

<maillist><user><time>2011</time><email>MUBnLmNvbQ==</email></user><user><time>2011</time><email>M0BnLmNvbQ==</email></user></maillist>

And here is the php:

$xml = simplexml_load_file('mail-list.xml');
 
    //Find if there is an email in the xml
    $result = $xml->xpath('//email[contains(.,"'.base64_encode($email).'")]');
    if ($result){ 
    echo "Found".base64_decode($result[0]); 
    }else{echo "No email found!";}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.