search
top

Reading XML

I am listing here method for reading XML file or XML string with the help of PHP. <?php $xml =<<<EOT <?xml version="1.0"?> <root> <section name="Section1"> <category id="Category1" name="google"> <article name="article1">value1</article> </category> <category id="Category2"...
read more

Generate XML

XML files are used for various functionalities. We can develop XML files by using PHP. If you have to develop very small project, you can use XML files for saving data instead of MySQL or any other databse with PHP, which will be easy for maintaining and response time will be reduced. I am listing a simple example. <?php $doc = new DOMDocument(); $doc->formatOutput = true; //$p...
read more

top