Apr
26

Simple XML

By admin  //  PHP  //  No Comments

PHP5 has come up lot of improvement when it comes to XML parsing as compared to parsing XML in PHP4. PHP5 has come up with a new function called SimpleXML for parsing XML files. This article will guide the PHP programmers on how to use the SimpleXML function in PHP5.

Advantages of SimpleXML

* You can now directly jump to content by providing the tag name
* Internally creates an Associative Arrays for Attributes so you can directly access the attributes by specifying the attribute name as key

Limitation of SimpleXML

* It cannot process XML document with version 1.0+ so it is necessary that the xml document should have version ‘1.0′.

For more information please visist
http://www.permadi.com/blog/2010/02/parsing-xml-in-php-using-simplexml/

Leave a comment