Since its introduction in 1998, XML has become an indispensable technology for exchanging data and operating across heterogeneous systems. Whether you’re sharing calendar events, importing syndication feeds, or querying an external API, XML is usually one of the formats available for consumption.

Early versions of PHP provided extensions for working with XML, but it wasn’t until the introduction of SimpleXML, DOM, XMLReader, and XMLWriter in PHP 5 that working with XML was streamlined. XML Parsing with PHP, edited and produced by php[architect], provides a comprehensive survey of the classes and functionality available for working with XML. This edition covers parsing and validating XML documents, leveraging XPath expressions, and working with namespaces as well as how to create and modify XML files programmatically. Each chapter contains examples illustrating how to use the different XML extensions at your disposal.

Written by PHP professional John M. Stokes, this book provides an easy-to-use reference for working with XML.

Topics Covered

  • SimpleXML
  • DOM
  • XMLReader & XMLWriter
  • XML Basics
  • Namespaces in XML documents
  • Working with syndication feeds
  • REST, SOAP, and WSDL
  • Validation with DTDs, RelaxNG, and XML Schema

About the Author

John M. Stokes is the lead developer on Verizon Wireless’s West Area Data Tools team, supporting users across the western United States. In that role he develops web applications, performs data analysis, and administers 30 Linux servers. He is a Zend Certified Engineer in PHP5, MySQL 5 Certified Developer, and Red Hat 6 Certified System Administrator. In addition to his work for Verizon, he developed the PDF Reader PEAR project for importing raw data from PDF files, and develops Android applications. He’s married with two children, and has a black belt in karate.