Load in DomDocument, create another one, load with <new_rootname/>, then append childnodes from the original one?
It sure works, but I'm not sure about performance...
Or: just take it as a string, and replace text? You could work it out by finding the first occurence of "/", and the last occurense of "<" etc etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.