Home > Store

XML by Example, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

XML by Example, 2nd Edition


  • Sorry, this book is no longer in print.
Not for Sale



  • Complete Coverage.
    • Teaches students XML, as well as explaining XML syntax with a list of common errors and misunderstandings. Ex.___

  • E-Commerce Application.
    • Walks students through a multi-tier e-commerce application using XML and Java. Ex.___

  • By Example approach—Throughout each chapter.
    • Reinforces concepts students have learned. Ex.___

  • Student-friendly pedagogical tools—Include Tips, Notes, Cautions, Cross-References and Chapter Summaries.
    • Helps guide students through the chapters. Ex.___

  • Structured programming techniques.
    • Students will develop a structured programming technique to isolate problems, write correct problems faster, and produce easy-to-maintain programs. Ex.___

  • Java Coverage.
    • Gives students added coverage on Java enhancing their programming knowledge. Ex.___


  • Copyright 2002
  • Dimensions: 7-3/8" x 9-1/8"
  • Pages: 512
  • Edition: 2nd
  • Book
  • ISBN-10: 0-7897-2504-5
  • ISBN-13: 978-0-7897-2504-2

XML by Example, 2nd edition has been revised and updated to include the newest standards, more robust examples, and better tools for developers to make the most of XML as they learn it. Building off readers¿ knowledge of HTML, JavaScript and web development, this book teaches XML using practical, real-world examples every step of the way. The book starts with a broad overview of the technologies and standards that make up XML. Following chapters teach each of these topics in depth, including new coverage of: more robust tools for parsing and manipulating XML, modeling with XML Schemas, managing extensibility with Namespaces, the latest version of XSL transformations (XSLT), applying style with XSL Formatting Objects and Cascading Style Sheets, object models including SAX 2 and DOM 2, and working with existing XML models: XHTML, WML and RSS. The final chapters design and build an XML-enabled e-Commerce application, putting together the concepts mastered earlier in the book.


Source Code

Source code from the book (PC) -- Examples.exe
Source code from the book (Mac) -- Setup.sit
Source code from the book (Linux) --setup.tar.gz

Source code from Appendix A -- Appendix A
Source code from Chapter 01 -- Chapter 01
Source code from Chapter 02 -- Chapter 02
Source code from Chapter 03 -- Chapter 03
Source code from Chapter 04 -- Chapter 04
Source code from Chapter 05 -- Chapter 05
Source code from Chapter 06 -- Chapter 06
Source code from Chapter 07 -- Chapter 07
Source code from Chapter 08 -- Chapter 08
Source code from Chapter 09 -- Chapter 09
Source code from Chapter 10 -- Chapter 10
Source code from Chapter 11 -- Chapter 11
Source code from Chapter 12 -- Chapter 12

Sample Content

Online Sample Chapters

Alternative API: SAX

The Parser and DOM

The Parser and DOM

Table of Contents


The by Example Series. Who Should Use This Book. This Book's Organization. Conventions Used in This Book.

1. The XML Galaxy.

Introduction. Where This Book Fits. A First Look at XML. A First Look on Document Structure. Markup Language History. Application of XML. Companion Standards. XML Software.

2. XML Syntax.

A First Look at the XML Syntax. Advanced Topics. Frequently Asked Questions About XML. Four Common Errors. Two Applications of XML. XML Editors.

3. XML Namespaces.

The Problem Namespaces Solves. Namespaces. URIs. Scoping. Digital Signature: An Example of Namespaces.

4. XML Models.

DTDs and XML Schemas. The DTD Syntax. Relationship Between the DTD and the Document. Advanced DTD Concepts. The Schema Syntax. Namespaces and Other Advanced Schema Concepts. Modeling XML Documents. Modeling Documents from an Object Model. Modeling from Scratch. A Tool to Help.

5. XSL Transformations.

Why Styling? XSL. Basic XSLT. Supporting Different Markup Languages. When and Where to Use Style Sheets. Advanced XSLT.

6. XSL Formatting Objects and Cascading Style Sheets.

Rendering XML Without HTML. The Basics of CSS and FO. Simple CSS. Simple FO. Flow Objects and Areas. Property Values. Box Properties. Text and Font Properties. Some Advanced Features. When Should You Use Which.

7. The Parser and DOM.

What Is a Parser? The Parser and the Application. Document Object Model. Getting Started with DOM. Managing the State. Common Errors and How to Solve Them. DOM and Java. DOM in Applications.

8. Alternative API: SAX.

Why Another API? SAX: The Power API. Commonly Used SAX Interfaces and Classes. Maintaining the State. Flexibility.

9. Writing XML.

The Parser Mirror. Modifying a Document with DOM. Exploring Netscape Support for DOM. DOM Methods to Create and Modify Documents. Creating a New Document with DOM. Using DOM to Create Documents. Creating Documents Without DOM. Doing Something with the XML Documents. Writing with Flexibility in Mind.

10. Important XML Models.

Structured and Extensible. XLink. XHTML. e-Commerce, XML/EDI, and ebXML. The Right Level of Abstraction. Attributes Versus Elements.

11. N-Tiered Architecture and XML.

What Is an N-Tiered Application? The XCommerce Application. How XML Helps. Programming SOAP. XCommerce Architecture. Server-Side Programming Language.

12. Putting It All Together: An e-Commerce Example.

Building XCommerce. First Tier: The Database. Second Tier: The SOAP Service. Third Tier: The Presentation Servlet. Utility Class: Comparing Strings.

Appendix A. Crash Course on Java.

Java in Perspective. Downloading Java Tools. Your First Java Application. Servlets. Your First Servlet. More Java Language Concepts.

Appendix B. DTD and XML Schema Simple Types.

Simple Types Supported by DTD. Simple Types Supported by XML Schema.



Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership