How can I edit the value's in a xml file using simpleXML ?
I know how to create the file, but not how to edit the value in an existing file ?
Sure you can edit with SimpleXML:
$input = <<<END <?xml version='1.0' standalone='yes'?> <documents> <document> <name>spec.doc</name> </document> </documents> END; $xml = new SimpleXMLElement($input); $xml->document[0]->name = 'spec.pdf'; $output = $xml->asXML();
Take a look at the examples.
1.4m articles
1.4m replys
5 comments
57.0k users