Sams Teach Yourself XML in 21 Days
-
Table of Contents
- About the Author
- Acknowledgments
- We Want to Hear from You!
- Introduction
- Part I: At a Glance
- Day 1. Welcome to XML
- Day 2. Creating XML Documents
- Day 3. Creating Well-Formed XML Documents
- Day 4. Creating Valid XML Documents: DTDs
- Declaring Attributes in DTDs
- Day 6. Creating Valid XML Documents: XML Schemas
- Day 7. Creating Types in XML Schemas
- Part I. In Review
- Day 8. Formatting XML by Using Cascading Style Sheets
- Day 9. Formatting XML by Using XSLT
- Day 10. Working with XSL Formatting Objects
- Part II. In Review
- Part III: At a Glance
- Day 11. Extending HTML with XHTML
- Day 12. Putting XHTML to Work
- Day 13. Creating Graphics and Multimedia: SVG and SMIL
- Day 14. Handling XLinks, XPointers, and XForms
- Part III. In Review
- Part IV: At a Glance
- Day 15. Using JavaScript and XML
- Day 16. Using Java and .NET: DOM
- Day 17. Using Java and .NET: SAX
- Day 18. Working with SOAP and RDF
- Part IV. In Review
- Part V: At a Glance
- Day 19. Handling XML Data Binding
- Day 20. Working with XML and Databases
- Day 21. Handling XML in .NET
- Part V. In Review
- Appendix A. Quiz Answers
Day 16. Using Java and .NET: DOM
Today, you're going to use Java to work with XML. Yesterday you saw how to work with XML and JavaScript, and today you're going to take the next step and create standalone programs using Java. Today you'll use the built-in Java support for the W3C DOM methods described yesterday. Here's an overview of today's topics:
- Loading XML documents into a Java application
- Parsing XML documents by using Java
- Searching a document for a particular element
- Navigating through an XML document by using Java
- Creating graphical XML browsers by using Java
- Modifying the XML in a document by using Java
Note that we must use Java version 1.4 or later if you want to take advantage of Java's integrated XML support for the W3C DOM, and you'll be using Java 1.4 today. There's all kinds of XML support built into Java 1.4 (with earlier versions, you have to use third-party packages), and you're going to jump right in by seeing how to read in an XML document and extract all the data from it.
Using Java to Read XML Data | Next Section