PHP SimpleXML tutorial will explain you how to manage the normal XML tasks and leaves the balance for different extensions with example. PHP SimpleXML is new in PHP 5 and the best things about PHP SimpleXML is how easily it performs basic tasks, such as reading XML files, extracting data from  strings, comparing and replacing nodes, and so forth.

PHP SimpleXML just needs a few lines of code to fetch text data from an element, which is best compared to DOM or the Expat parser.

Note: As of PHP 5.0, the SimpleXML functions are part of the PHP core. There is no installation needed to use these functions.

Example on SimpleXML

First we will write an XML file:

Now we will write a PHP file:

Output for above code:

Previous articlePHP XML DOM
Next articlePHP XML Functions
I am a young Information Systems Security Engineer(CEH). I had started with penetration testing when i am 17 years old. It all started with Kali linux and Metasploit.In free time i will play with Security holes/Bug bounty/Pentesting and Hacking !!!