Main | Atom Syndication Format is now an RFC standard »

Reading and writing the XML DOM with PHP

Jack Herrington, Senior Software Engineer from the "Code Generation Network", have written a very intersting article about Using the DOM library, SAX parser and regular expressions. The article have been published in IBMDeveloperworks which started to interest recently too much to open source and PHP after its alliance with Zend to develop Zend Core for IBM :

Reading and writing Extensible Markup Language (XML) in PHP may seem a little frightening. In fact, XML and all its related technologies can be intimidating. However, reading and writing XML in PHP doesn't have to be a daunting task. First, you need to learn a little about XML -- what it is and what it's used for. Then, you need to learn how to read and write XML in PHP, which you can do in many ways.

The article is for intermediate level and show in details since the XML document until reading the data using the different techniques DOM, SAX and regular expression. The article describe also how to write XML using DOM and SAX and the example used of the xml book is very well explained and show details of why XML created with PHP could be annoying, because you could miss that entities and making valid XML document.

However Jack concluded with : XML has always had a lot of hype and confusion surrounding it. However, it's not as difficult as you think it is -- especially in a great language like PHP. When you understand and implement XML properly, you'll find there are a lot of powerful tools you can use. XPath and XSLT are two such tools that are worth checking out.. All the necessary tools are available in PHP, but an understanding of XML is necessary to use them correctly.

Bookmark this article at these sites
Post a comment





(Email will remain hidden)





Please enter the security code you see here




Related entries
Email to a friend
Email this article to:


Your email address:


Message (optional):