I have a DOM XML object which I can merrily add_child() to. If I now constuct an XML node in a string ($node = '<whatever>...</whatever>😉, how can I then add this node to my DOM object? If I try adding it as the content of a new node, the DOM object encodes the < > characters, etc.
I guess I could dump the dom object to a string, then concat the strings then convert back into a dom object, but as I need to repeat this action many times, the performance would take quite a hit...
Any ideas?