Chapter 9. XML Requests and Responses: More Than Words Can Say

image with no caption

How will you describe yourself in 10 years? How about 20?

Sometimes you need data that can change with your needs... or the needs of your customers. Data you’re using now might need to change in a few hours, or a few days, or a few months. With XML, the extensible markup language, your data can describe itself. That means your scripts won’t be filled with ifs, elses, and switches. Instead, you can use the descriptions that XML provides about itself to figure out how to use the data the XML contains. The result: more flexibility and easier data handling.

Note

As a special bonus, we’re bringing back the DOM in this chapter... keep an eye out!

Classic rock gets a 21st century makeover

Rob’s Rock and Roll Memorabilia has hit the big time. Since going online with the site you built for Rob, he’s selling collectible gear to rich customers around the world.

In fact, Rob’s gotten lots of good feedback on the site, and he’s making some improvements. He wants to include a price for each item, in addition to the description, and he also wants to be able to include a list of related URLs so customers can find out more about each item.

image with no caption

Get Head First Ajax 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.