Tag: DOMDocument to read and write XML file

Read and Write an XML File using PHP

How to read and write xml document with php’s DOMDocument. The DOM extension allows you to operate on XML documents through the DOM API with PHP 5. For better understanding, I have written comment for almost every line of code. XML Code: file name – employee.xml [xml] <?xml version="1.0"?> <employees> <employee id="1" name="Albert"><age>34</age><![CDATA[ Employee details …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/07/read-and-write-an-xml-file-using-php/