XML Step by Step
By Michael J. Young
Published by Microsoft Press
Pages: 382, plus a companion CD
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 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.
For a description of why I wrote this book and the unique features I put into it, please see "Why Another XML Book?" from the book's Introduction.
Topics on this page:
See also: XML Step by Step Second Edition
Using this book you'll learn:
- What XML is, why it's needed, and how it's being used to solve real-world problems
- The rules and techniques for creating well-formed and valid XML documents, based on the official specification of the W3C (World Wide Web Consortium)
- How to display XML documents directly in Web browsers using cascading style sheets (CSS) or Extensible Stylesheet Language (XSL)
- How to display XML documents through conventional HTML (Hypertext Markup Language) pages using data binding, the XML Document Object Model (DOM), and the Microsoft® JScript scripting language
- How to use XML with Microsoft Internet Explorer 5.0 through 5.5, Microsoft Windows® 98, and Microsoft Windows® 2000
Included on the CD-ROM:
- The example files for all hands-on exercises
- Extensive links to further information and resources
- Microsoft Internet Explorer 5.01
Read an excerpt from the Introduction.
Part I: Getting Started
Chapter 1: Why XML?
The Need for XML
The Official Goals of XML
Standard XML Applications
Real-World Uses for XML
Chapter 2: Creating and Displaying Your First XML Document
Creating an XML Document
Displaying the XML Document
Part II: 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
Chapter 4: Adding Comments, Processing Instructions, and CDATA Sections
Using Processing Instructions
Including CDATA Sections
Chapter 5: Creating Valid XML Documents
The Basic Criteria for a Valid XML Document
The Advantages of Making an XML Document Valid
Adding the Document Type Declaration
Declaring Element Types
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
Part III: Displaying XML Documents on the Web
Chapter 7: Displaying XML Documents Using 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 colorProperty
Setting Background Properties
Setting Text Spacing and Alignment Properties
Setting Box Properties
Inserting HTML Elements into XML Documents and Using Namespaces
Creating and Using a Full-Featured Cascading Style Sheet
Chapter 8: 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 9: 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 10: Displaying XML Documents Using XSL Style Sheets
Using an XSL Style Sheet—the Basics
Using a Single XSL Template
Using Multiple Templates
Filtering and Sorting XML Data
Accessing XML Attributes
Appendix: Web Addresses for Further Information
If you purchased XML Step by Step without a companion CD, you can obtain all of the example source files that are included on the CD by downloading the ZIP file XMLSBSe1.zip.
Note that some or all of these errors might have been corrected in more recent printings of the book.
links to Web sites throughout the book
Unfortunately, since the book is now a few years old, many of the Web links are no longer valid. You should be able to locate many of the referenced pages using Google.
Introduction, page ix, second paragraph, "XML has a highly flexible syntax..."
I shouldn't have used the word "syntax." Compared to HTML, XML actually has a strict syntax (no omission of end-tags, no overlapping elements, and so on). What I meant is that XML, unlike HTML, permits you to create your own elements and document structure, and therefore allows you to describe virtually any kind of information.
Introduction, page xiv, "How to Contact the Author"
page 76, the heading "Adding the DTD" and page 77, the heading "The Form of the DTD"
Both headings should state "Document Type Declaration" rather than "DTD." "DTD" refers to the document type definition, which is contained or referenced within the document type declaration.
page 117, DTD at top of page
Can you see why the example on this page is actually an invalid XML document? You're right: I forgot to declare the HEADING element that gets added through the entity file. The following markup declaration should be added to the DTD:
<!ELEMENT HEADING (#PCDATA)>
page 168, in the table of font-style properties
"font-size keyword" should be "font-style keyword" (in 3 places)
page 170, paragraph in middle of page
"The samples in the right column..." should be "The samples in the above table..."
page 198, table of border-style property settings
The none keyword should be marked as the default.
page 200, table of border-width property settings
The medium keyword should be marked as the default.
page 225, first paragraph
In the text "...an XML document, with its flexible syntax..." I shouldn't have used the word "syntax." See the correction for Introduction, page ix.
page 336, in the Tip at the top of the page, second sentence
"XLS" should be "XSL".
Appendix and the file Appendix.htm on the companion CD
Because Microsoft periodically reorganizes the MSDN site, most of the links to MSDN pages are broken. You'll need to use the site's search and navigate tools to locate the various topics.