title: In SimpleXML, how can I add an existing SimpleXMLElement as a child element?
body: <p>I have a SimpleXMLElement object $child, and a SimpleXMLElement object $parent.</p>
  
  <p>How can I add $child as a child of $parent?  Is there any way of doing this without converting to DOM and back?</p>
  
  <p>The addChild() method only seems to allow me to create a new, empty element, but that doesn't help when the element I want to add $child also has children.  I'm thinking I might need recursion here.</p>