xml php can i delete a text node or a whole element?

CazZmo

New member
I am working with an xml file that stores a blurb of text
i then want to be able to go back and overwrite that text when it needs to be changed.

<?php
$dom = new DomDocument('1.0');
$dom->load('about.xml');
$root = $user->getElementsByTagName("about");

// here i want to delete the text that is already there and just replace it with a variable

$dom->save('about.xml');
?>

the xml file format is

<?xml version="1.0"?>
<user>
<about>Fixmeplease</about>
</user>

how would i go about getting the text in the <about> to change?
 
Back
Top