I have a SimpleXMLElement
made, and I want to write my own XML inside it, whenever I write the XML it returns with <
and other escaped characters. With XMLWriter
's writeRaw
function, I can write <a>a</a><b>b</b>
and the XML file will include that exact string, not escaped in any way.
Is there a way I can write that string using SimpleXMLElement
and have it return with the exact string, not escaped.
I have seen this question before, but the answer returns an error when I use it and I cannot seem to fix it.