Chapter 28. Working with XML and JSON

In this chapter, you learn the following:

How to create a basic XML document structure

How to access XML in PHP using DOM functions

How to access XML in PHP using SimpleXML functions

How to work with JSON data

This chapter introduces you to working with XML documents and JSON data via PHP, but in no way is it comprehensive—entire books have been written on XML alone. However, for people new to XML, XML manipulation via PHP, and to receiving and working with JSON data, some sets of functions are more manageable than others; this chapter introduces you to a few of them.

What Is XML?

The name XML comes from the full name of the language, Extensible Markup Language. Although markup is in the name of ...

Get Sams Teach Yourself PHP, MySQL® and Apache All in One, Fifth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.