I was trying to insert new data into an existing XML file, but it\'s not working. Here\'s my xml file:
swimming
$newText = $xmldoc->createTextNode($newActv);
Change this line to
$newText = $xmldoc->createTextNode($newAct);