14. XML and PHP

XML, the Extensible Markup Language, is one of the most used technologies for sharing data between computers and applications. XML provides a format for storing not just information but also information about the information (aka meta-information). XML, like HTML, is based on Standard Generalized Markup Language, or SGML, which means that you’ll see numerous similarities between the two (in fact, XHTML, is a combination of them). Early versions of PHP supported XML, PHP 4 improved upon that support, and PHP 5 took things even further.

This chapter begins with a basic introduction to XML: what it is, the proper XML syntax, and how to make your own XML document. From there, PHP will take over, both for reading and creating XML ...

Get PHP 5 Advanced: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.