Skip to Content
Ajax For Dummies®
book

Ajax For Dummies®

by PhD Steve Holzner
March 2006
Beginner to intermediate
384 pages
6h 47m
English
Wiley
Content preview from Ajax For Dummies®

Chapter 8. Handling XML in Ajax Applications

<feature><title>In This Chapter</title> <objective>

Understanding basic XML

</objective>
<objective>

Navigating XML documents using JavaScript

</objective>
<objective>

Grabbing XML elements en masse

</objective>
<objective>

Extracting the values of XML attributes

</objective>
<objective>

Validating the XML you get from the server

</objective>
</feature>

“Hm,” says the crack Ajax programmer. “I need some help.”

“Glad to be of service,” you say. “What can I help you with?”

“I’ve got my XML from the server okay, but now I can’t deal with it. How the heck do I navigate from element to element? How do I get the data I need out of this XML?”

“No problem,” you say. “Just read this chapter.” And you present the surprised Ajax programmer with your bill.

Ajax is all about getting data — often XML data — from the server. How do you handle that XML back in the browser? JavaScript has some strong XML-handling capabilities, as you discover in this chapter. Knowing how to work with XML in JavaScript is essential for any Ajax programmer because the server sends you XML, and you need to know how to extract data from that XML.

Understanding Basic XML

To work with XML in Ajax, you need to understand a few basics about the language and how it works. One key feature of XML is that you’re not restricted to a pre-determined set of tags, as in languages like HTML. You can create your own. In addition to tags, you also need to understand what makes an XML document well-formed ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JavaScript® and AJAX for Dummies®

JavaScript® and AJAX for Dummies®

Andy Harris
Ajax in Action

Ajax in Action

Darren James, Dave Crane, Eric Pascarello
Ajax Bible

Ajax Bible

Steven Holzner

Publisher Resources

ISBN: 9780471785972Purchase book