Hour16.Parsing XML with the DOM


Hour 16. Parsing XML with the DOM

The DOM very rarely makes sense, especially when it comes to namespaces. If you want to retain your sanity, avoid it.

Michael Kay

It simply isn't possible to write a book about XML while avoiding the DOM, or Document Object Model. The truth is that the DOM won't lead you down the path to insanity, although I can certainly respect Mr. Kay's opinion since I've struggled with the DOM myself from time to time. For this reason, you shouldn't think of the DOM as the end-all tool to XML processing for the Web. It's just one of many tools that you should have in your XML development arsenal, ready to engage when needed. This hour explores the DOM and the basics of how it is used. In doing so, you learn how it provides a set of interfaces that can be used to represent an entire XML document programmatically. This hour discusses

  • What the Document Object Model is

  • The interfaces that make up the DOM

  • How to build programs that traverse the DOM

  • How to access specific data inside an XML document using the DOM

  • How to modify an XML document using the DOM




Sams Teach Yourself XML in 24 Hours
Sams Teach Yourself XML in 24 Hours, Complete Starter Kit (3rd Edition)
ISBN: 067232797X
EAN: 2147483647
Year: 2005
Pages: 266

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net