Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
Experts Most Trusted Topic
in simplexml how can i add an existing simplexmlelement as a child element using -'php,oop,simplexml'
in simplexml how can i add an existing simplexmlelement as a child element ¬†using -'php,oop,simplexml'
I have a SimpleXMLElement object $child, and a SimpleXMLElement object $parent.
How can I add $child as a child of $parent? ¬†Is there any way of doing this without converting to DOM and back?
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.
Sep 7, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening