I basicly need to load the whole XML file, add a new line with content and then saving it. But I wondered which one is faster.. XMLWriter or SimpleXML? Oh, and, it’s mainly large XML files, more then 10MB.
As per PHP’s manual, XMLWriter “provides a non-cached, forward-only means of generating streams or files containing XML data.”
It cannot be used to load a document and modify it, therefore it’s not an option and you’re pretty much left with SimpleXML.
Answered By – Josh Davis
Answer Checked By – Mary Flores (BugsFixing Volunteer)