> online showcase > books > XML Step by Step Second Edition

XML Step by Step Second Edition XML Step by Step Second Edition

By Michael J. Young

Published by Microsoft Press
Pages: 488 plus a companion CD
ISBN: 0735614652

STC logo  

The first edition of XML Step by Step won the top award, "Distinguished Technical Communication," in the 2000-2001 International Technical Publications Competition of the Society for Technical Communication (STC).


A book and CD providing a complete XML learning kit!

XML (Extensible Markup Language) is currently the most promising language for storing and delivering information on the Web. Because XML allows you to create your own elements, attributes, and document structure, you can use it to describe virtually any kind of information—from a simple recipe to a complex business database. And because an XML document so effectively organizes and labels the information it contains, you can easily sort, filter, search, and manipulate that information in highly flexible ways. XML Step by Step Second Edition clearly explains the basics of XML, and shows both nonprogrammers and Web developers how to create effective XML documents and how to display them on the Web. The book takes a hands-on learning approach, and focuses on the most practical techniques that you can use now, even if you don't have extensive technical knowledge.

Topics on this page:

What's New in the Second Edition of XML Step by Step

The following are some of the important updates to the book:

The second edition is about 100 pages longer than the first. The following are some of the important new or expanded topics you'll find in these additional pages:



Why Another XML Book?

What You'll Learn in This Book

XML Step by Step, Internet Explorer, and MSXML

Using the Companion CD Requirements

How to Contact the Author

Microsoft Press Support Information

Read an excerpt from the Introduction.

Part 1: Getting Started

Chapter 1: Why XML?

The Need for XML

The Official Goals of XML

Standard XML Applications

Real-World Uses for XML

XML Applications for Enhancing XML Documents

Chapter 2: Creating and Displaying Your First XML Document

Creating an XML Document

Displaying the XML Document

Read Part I.

Part 2: Creating XML Documents

Chapter 3: Creating Well-Formed XML Documents

The Parts of a Well-Formed XML Document

Adding Elements to the Document

Adding Attributes to Elements

Using Namespaces

Chapter 4: Adding Comments, Processing Instructions, and CDATA Sections

Inserting Comments

Using Processing Instructions

Including CDATA Sections

Chapter 5: Creating Valid XML Documents Using Document Type Definitions

The Basic Criteria for a Valid XML Document

The Advantages of Making an XML Document Valid

Adding the Document Type Declaration

Declaring Element Types

Declaring Attributes

Using Namespaces in Valid Documents

Using an External DTD Subset

Converting a Well-Formed Document to a Valid Document

Chapter 6: Defining and Using Entities

Entity Definitions and Classifications

Declaring General Entities

Declaring Parameter Entities

Inserting Entity References

Inserting Character References

Using Predefined Entities

Adding Entities to a Document

Chapter 7: Creating Valid XML Documents Using XML Schemas

XML Schema Basics

Declaring Elements

Declaring Attributes

Creating an XML Schema and an Instance Document

Part 3: Displaying XML Documents on the Web

Chapter 8: Displaying XML Documents Using Basic Cascading Style Sheets

The Basic Steps for Using a Cascading Style Sheet

Cascading in Cascading Style Sheets

Setting the display Property

Setting Font Properties

Setting the color Property

Setting Background Properties

Setting Text Spacing and Alignment Properties

Chapter 9: Displaying XML Documents Using Advanced Cascading Style Sheets

Setting Box Properties

Using Pseudo-Elements (Internet Explorer 5.5 through 6.0 Only)

Inserting HTML Elements into XML Documents

Creating and Using a Full-Featured Cascading Style Sheet

Chapter 10: Displaying XML Documents Using Data Binding

The Main Steps

The First Step: Linking the XML Document to the HTML Page

The Second Step: Binding HTML Elements to XML Elements

Using Scripts with the DSO

Chapter 11: Displaying XML Documents Using Document Object Model Scripts

Linking the XML Document to the HTML Page

The Structure of the DOM

Accessing and Displaying XML Document Elements

Accessing and Displaying XML Document Attribute Values

Accessing XML Entities and Notations

Traversing an Entire XML Document

Checking An XML Document for Validity

Chapter 12: Displaying XML Documents Using XSLT Style Sheets

Using an XSLT Style Sheet—the Basics

Using a Single XSLT Template

Using Multiple Templates

Using Other Select and Match Expressions

Filtering and Sorting XML Data

Accessing XML Attributes

Referencing Namespaces in XSLT

Using Conditional Structures

Appendix: Web Addresses for Further Information

General Information on XML

Internet Explorer and MSXML

XML Applications


URIs and URNs

XML Schemas

Cascading Style Sheets (CSS)

Data Binding and the Data Source Object (DSO)

ActiveX Data Objects (ADO) and the ADO recordset Object

HTML and Dynamic HTML (DHTML)

Microsoft JScript

The Document Object Model (DOM)

Extensible Stylesheet Language Transformations (XSLT) and XPath

Author's Web Site

Companion CD

Download CD Files!

If you purchased XML Step by Step Second Edition without a companion CD, you can obtain all of the example source files that are included on the CD by downloading the ZIP file XMLSBSe2.zip.


Note that some or all of these errors might have been corrected in more recent printings of the book.

page references throughout book

The desktop publishers inserted the wrong page numbers for many of the page references in the book. For a list of corrections, click here.

Table of Contents and headings throughout book

The desktop publishers incorrectly changed some of the lower-level headings to top-level headings. The following headings, which appear as top-level headings in the book, should actually be second-level headings and should not be included in the Table of Contents (which is supposed to show only top-level headings):

  • p10 "Displaying XML Documents"
  • p11 "SGML, HTML, and XML"
  • p169 "Declaring an Element with a Simple Type"
  • p231 "Setting the font-variant Property"
  • p309 "Using Paging"

page xviii, "caution" element

The desktop publishers removed the apostrophes from this "caution" element. The words havent, arent, and isnt should of course be haven't, aren't, and isn't.

page 56-57, "White Space in Elements" sidebar

In two places,

<VERSE>For the rare and radiant maiden<VERSE>

should be

<VERSE>For the rare and radiant maiden</VERSE>

(Thanks to Henry Hayden for discovering this error.)

page 62, figure at the beginning of the section "Adding Attributes to Elements"

The desktop publishers inserted the incorrect figure (a graphic showing the filename "Inventory04.xml"). The following is the correct figure:

Graphic 3-12

page 72, figure showing the close up of the book namespace declaration

The figure is missing the http:// part of the namespace name. The following is the correct figure:

Graphic 3-15

page 84, line of XML source near top of page

The words target and instruction should be italicized because they are placeholders, not the source that you literally type in:

<?target instruction ?>

page 118-119, Listing 5-1

The XML document 'Collection Default Valid.xml' (in Listing 5-1 and on the companion CD) generates a nonsensical error message when it's opened in Internet Explorer 5.5. I haven't thoroughly investigated the problem, but it appears that versions of MSXML prior to 3 don't support namespaces in DTDs. The problem should go away if you upgrade to IE 6 (which installs MSXML 3), or if you install MSXML 4 from the book's companion CD with an earlier version of IE. Please let me know about your experiences with this XML document.

page 156, table near bottom of page

The apostrophe and quote characters in the second column should be straight (' and "), not curly.

page 190, beginning of Listing 7-4

The desktop publishers duplicated the first two lines of this listing (the document is actually malformed as printed, and would generate a fatal parser error). The first part of the listing should be as follows:

Inventory Instance.xml

<?xml version="1.0"?>

<!-- File Name: Inventory Instance.xml -->

   <BOOK InStock="true">

page 192, numbered item 2

The text,

2  Save the document on your hard disk, assigning it the filename Inventory Instance.xsd.

should be

2  Save the document on your hard disk, assigning it the filename Inventory Instance.xml.

page 258, figure at bottom of page

The desktop publishers inserted the incorrect figure (an oddly compressed version of a figure from a different chapter). Unfortunately, this is a key figure for this chapter. To view the correct figure, click here.

page 298, "Tip" element

"Using the C++ XML Data Source Object," should be "Use the C++ XML Data Source Object"

"Using the Master/Detail Feature with the C++ XML Data Source Object" should be "Use the Master/Detail Feature with the C++ XML Data Source Object"

page 389, Listings 11-7 and 11-8

The desktop publishers ran Listings 11-7 and 11-8 together. The lines between the two listings,

Listing 11-7

Inventory Entity.htm

should not be in monospace font (which makes them appear to be part of the listings).

Chapter 12

The expression "XSLT root node" used in this chapter confused at least one reader. The XSLT processor that's built into the browser reads the XML document and then constructs a hierarchical representation of the document. The "root node" of this XSLT hierarchy represents the entire XML document. By "XSLT root node" I therefore mean the root node of the hierarchical model of the XML document that is constructed by the XSLT system (representing the entire XML document). I suppose it would have been clearer—although considerably more awkward—to say something like "the root node of the XSLT model of the XML document" rather than "the XSLT root node," to make it clear that I'm not referring to the root or anything else about the XSLT file itself.

page 456, first paragraph following the source listing at top of page

"You could use the xsl:template element..." should be "You could use the xsl:attribute element..."

Valid HTML 4.01 Transitional