Error appending element to the dom for a node in the xml
===

I have this xml node

       <event id="e20120630204436">
        <title>event stop</title>
        <source>LiveMass</source>
        <channel id="0">
         <name>Pax TV</name>
         <onclick/>
        </channel>
        <event_site>
         <name/>
         <url/>
         <onclick/>
        </event_site>
        <start_date>Sun Jul 01 2012:07/01/2012</start_date>
        <start_time>10:00 AM</start_time>
        <end_date>Sun Jul 01 2012</end_date>
        <end_time>11:00 AM</end_time>
        <notes/>
       </event>

I retrieve this node and want to append to it new data.  I do this with this code:

	$nodes = $xml->xpath("//event[@id='$nodeid']");

	if ( count($nodes) >= 1 ) { 
	    $node = $nodes[0]; 
	}
	else {
	    return;
	}
	
	$nodedom = dom_import_simplexml($node);
	$dom = $nodedom->ownerDocument;
	
	$xweeks     = $dom->createElement("remind_weeks");  
	$xweeksText = $dom->createTextNode($remind_weeks);  
	$xweeks->appendChild($xweeksText); 

	$xsend_remind = $dom->createElement("send_remind");  
	$xsend_remind->appendChild($xweeks);
	
	$dom->appendChild($xsend_remind);
	$savedom = $dom->saveXML();
	$xml = new SimpleXMLElement($savedom);

But I get these warnings and then a fatal error for this line `$xml = new SimpleXMLElement($savedom);`.

    Warning: SimpleXMLElement::__construct(): Entity: line 233: parser error : Extra content at the end of the document in /Library/WebServer/Documents/Pagelinks_Dev/save_remind.php on line 97
    
    Warning: SimpleXMLElement::__construct(): <send_remind><remind_weeks>11</remind_weeks></send_remind> in /Library/WebServer/Documents/Pagelinks_Dev/save_remind.php on line 97
    
    Warning: SimpleXMLElement::__construct(): ^ in /Library/WebServer/Documents/Pagelinks_Dev/save_remind.php on line 97
    
    Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /Library/WebServer/Documents/Pagelinks_Dev/save_remind.php:97

What must I do to fix this error?