9780130284174

XML How to Program

by ; ; ; ;
  • ISBN13:

    9780130284174

  • ISBN10:

    0130284173

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2000-12-21
  • Publisher: Pearson

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $193.32 Save up to $48.33
  • Buy Used
    $144.99
    Add to Cart Free Shipping

    USUALLY SHIPS IN 2-4 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

This comprehensive guide to programming in XML teaches readers how to use XML to create customized tags and addresses standard custom markup languages for science and technology, multimedia, commerce, and other fields.Includes a concise introduction to Java, as well as cutting edge topics such as XQL, SMIL and VoiceXML as well as a real-world e-Commerce case study. Also includes a complete chapter on Web-accessibility that addresses VoiceXML. Provides hundreds of valuable programming tips.For XML programmers and Internet/Web programmers.

Author Biography

Dr. Harvey M. Deitel, CEO of Deitel & Associates, Inc., has 40 years experience in the computing field including extensive industry and academic experience. He is one of the world's leading computer science instructors and seminar presenters. Dr. Deitel earned B.S. and M.S. degrees from the Massachusetts Institute of Technology and a Ph.D. from Boston University. He worked on the pioneering virtual memory operating systems projects at IBM and MIT that developed techniques widely implemented today in systems like UNIX, Linux and Windows NT. He has 20 years of college teaching experience including earning tenure and serving as the Chairman of the Computer Science Department at Boston College before founding Deitel & Associates, Inc. with Paul J. Deitel. He is author or co-author of several dozen books and multimedia packages and is currently writing many more. With translations published in Japanese, Russian, Spanish, Elementary Chinese, Advanced Chinese, Korean, French, Polish, Portuguese and Italian, Dr. Deitel's texts have earned international recognition. Dr. Deitel has delivered professional seminars internationally to major corporations, government organizations and various branches of the military.

Paul J. Deitel, Executive Vice President of Deitel & Associates, Inc., is a graduate of the Massachusetts Institute of Technology's Sloan School of Management where he studied Information Technology. Through Deitel & Associates, Inc. he has delivered Java, C, C++ and Internet and World Wide Web courses for industry clients including Compaq, Sun Microsystems, White Sands Missile Range, Rogue Wave Software, Computervision, Stratus, Fidelity, Cambridge Technology Partners, Boeing, Lucent Technologies, Adra Systems, Entergy, CableData Systems, NASA at the Kennedy Space Center, the National Severe Storm Laboratory, IBM and many other organizations. He has lectured on C++ and Java for the Boston Chapter of the Association for Computing Machinery, and has taught satellite-based Java courses through a cooperative venture of Deitel & Associates, Inc., Prentice Hall and the Technology Education Network. He and his father, Dr. Harvey M. Deitel, are the world's best-selling Computer Science textbook authors.

Tem R. Nieto, Director of Product Development with Deitel & Associates, Inc., is a graduate of the Massachusetts Institute of Technology where he studied engineering and computing. Through Deitel & Associates, Inc. he has delivered courses for industry clients including Sun Microsystems, Compaq, EMC, Stratus, Fidelity, Art Technology, Progress Software, Toys "R" Us, Operational Support Facility of the National Oceanographic and Atmospheric Administration, Jet Propulsion Laboratory, Nynex, Motorola, Federal Reserve Bank of Chicago, Banyan, Schlumberger, University of Notre Dame, NASA, various military installations and many others. He has co-authored several books and multimedia packages with the Deitels and has contributed to virtually every Deitel & Associates, Inc. publication.

Ted M. Lin is a senior at Carnegie Mellon University where he is double majoring in computer science and electrical/computer engineering. He enjoys building Web sites and internet applications involving leading-edge technologies.

Praveen Sadhu is a graduate student at Northeastern University majoring in engineering software design. He received his bachelor's degree in Electrical Engineering from Hyderabad, India.

Table of Contents

Preface xxvii
Introduction to the Internet and World Wide Web
1(22)
Introduction
2(1)
World Wide Web Consortium (W3C)
2(1)
History of the Internet
3(1)
History of the World Wide Web
4(1)
Future of Computing
5(1)
History of SGML
6(1)
XML and XML How to Program
7(3)
A Tour of the Book
10(9)
W3C XML Resources
19(1)
Internet and World Wide Web Resources
19(4)
Introduction to HyperText Markup Language 4: Part I
23(23)
Introduction
24(1)
Markup Languages
25(1)
Editing HTML
25(1)
Common Elements
26(2)
Headers
28(1)
Linking
29(3)
Images
32(3)
Special Characters and More Line Breaks
35(2)
Unordered Lists
37(1)
Nested and Ordered Lists
38(3)
Internet and World Wide Web Resources
41(5)
Introduction to HyperText Markup Language 4: Part II
46(33)
Introduction
47(1)
Basic HTML Tables
47(3)
Intermediate HTML Tables and Formatting
50(2)
Basic HTML Forms
52(3)
More Complex HTML Forms
55(7)
Internal Linking
62(2)
Creating and Using Image Maps
64(3)
<meta> Tags
67(1)
frameset Element
68(2)
Nested framesets
70(2)
Internet and World Wide Web Resources
72(7)
Cascading Style Sheets™ (CSS)
79(31)
Introduction
80(1)
Inline Styles
80(1)
Creating Style Sheets with the style Element
81(3)
Conflicting Styles
84(3)
Linking External Style Sheets
87(2)
Positioning Elements
89(3)
Backgrounds
92(3)
Element Dimensions
95(2)
Text Flow and the Box Model
97(5)
User Style Sheets
102(3)
Internet and World Wide Web Resources
105(5)
Creating Markup with XML
110(24)
Introduction
111(1)
Introduction to XML Markup
111(1)
Parsers and Well-formed XML Documents
112(1)
Parsing an XML Document with msxml
113(1)
Characters
114(4)
Character Set
115(1)
Characters vs. Markup
115(1)
White Space, Entity References and Built-in Entities
115(1)
Using Unicode in an XML Document
116(2)
Markup
118(4)
CDATA Sections
122(1)
XML Namespaces
123(3)
Case Study: A Day Planner Application
126(1)
Internet and World Wide Web Resources
127(7)
Document Type Definition (DTD)
134(31)
Introduction
135(1)
Parsers, Well-formed and Valid XML Documents
135(1)
Document Type Declaration
136(1)
Element Type Declarations
137(8)
Sequences, Pipe Characters and Occurrence Indicators
139(4)
EMPTY, Mixed Content and ANY
143(2)
Attribute Declarations
145(2)
Attribute Defaults (#Required, #Implied, #Fixed)
147(1)
Attribute Types
147(6)
Tokenized Attribute Type (ID, Idref, Entity, Nmtoken)
147(6)
Enumerated Attribute Types
153(1)
Conditional Sections
153(2)
Whitespace Characters
155(3)
Case Study: Writing a DTD for the Day Planner Application
158(1)
Internet and World Wide Web Resources
159(6)
Schemas
165(27)
Introduction
166(1)
Schema vs. DTDs
167(1)
Microsoft XML Schema: Describing Elements
167(7)
Microsoft XML Schema: Describing Attributes
174(3)
Microsoft XML Schema: Data Types
177(6)
W3C XML Schema
183(2)
Case Study: Writing a Microsoft XML Schema for the Day Planner Application
185(1)
Internet and World Wide Web Resources
186(6)
Document Object Model (DOM™)
192(40)
Introduction
193(1)
DOM Implementations
194(1)
DOM with JavaScript
194(5)
Setup
199(1)
DOM Components
199(10)
Creating Nodes
209(4)
Traversing the DOM
213(3)
Case Study: Modifying the Day Planner Application to Use the DOM
216(11)
Internet and World Wide Web Resources
227(5)
Simple API for XML (SAX)
232(31)
Introduction
233(1)
DOM vs. SAX
233(1)
SAX-based Parsers
234(1)
Setup
234(1)
Events
234(1)
Example: Tree Diagram
235(10)
Case Study: Using SAX with the Day Planner Application
245(9)
SAX 2.0
254(4)
Internet and World Wide Web Resources
258(5)
Case Study: XmlMessenger Program
263(34)
Introduction
264(1)
Setup
265(1)
Overview: Server Side of XmlMessenger
266(1)
Implementation: Server Side of XmlMessenger
267(10)
Overview: Client Side of XmlMessenger
277(3)
Implementation: Client Side of XmlMessenger
280(17)
XML Path Language (XPath)
297(22)
Introduction
298(1)
Nodes
298(7)
Location Paths
305(5)
Axes
305(1)
Node Tests
306(1)
Location Paths Using Axes and Node Tests
306(4)
Node-set Operators and Functions
310(4)
Internet and World Wide Web Resources
314(5)
XSL: Extensible Stylesheet Language Transformations (XSLT)
319(34)
Introduction
320(1)
Setup
320(1)
Templates
321(1)
Creating Elements and Attributes
322(5)
Iteration and Sorting
327(4)
Conditional Processing
331(2)
Copying Nodes
333(2)
Combining Stylesheets
335(5)
Variables
340(1)
Case Study: XSLT and XPath
341(6)
Internet and World Wide Web Resources
347(6)
XSL: Extensible Stylesheet Language Formatting Objects
353(19)
Introduction
354(1)
Setup
355(1)
Examples of XSL Formatting-object Documents
355(10)
Lists
365(3)
Internet and World Wide Web Resources
368(4)
XLink, XPointer, XInclude and XBase
372(23)
Introduction
373(1)
XML Linking Language (XLink)
373(12)
Simple Links
374(4)
Extended Links
378(7)
XLink and DTDs
385(3)
XML Pointer Language (XPointer)
388(1)
XML Inclusions (XInclude)
389(1)
XML Base (XBase)
390(1)
Internet and World Wide Web Resources
391(4)
Case Study: Message Forum with Active Server Pages
395(23)
Introduction
396(1)
Setup and Message Forum Documents
396(1)
Forum Navigation
397(4)
Adding Forums
401(6)
Forum XML Documents
407(4)
Posting Messages
411(1)
Other HTML Documents
411(5)
Internet and World Wide Web Resources
416(2)
Server-side Java Programming
418(66)
Introduction
419(1)
Cocoon
419(4)
Extensible Server Pages (XSP)
423(7)
Case Study: A Wireless Online Bookstore
430(3)
Jakarta Tomcat Setup
433(1)
WAP and WML: Client-side Documents
434(4)
Java Servlets
438(43)
Internet and World Wide Web Resources
481(3)
Perl and XML: A Web-based Message Forums Application
484(19)
Introduction
485(1)
Perl and XML
485(1)
Setup
485(2)
Displaying the Forums using XML: : Parser
487(3)
Using XML: : DOM to Add Forums and Messages
490(5)
Alterations for Non-XSL Browsers
495(6)
Internet and World Wide Web Resources
501(2)
Accessibility
503(24)
Introduction
504(1)
Providing Alternatives for Multimedia Content
504(3)
Maximizing Readability by Focusing on Structure
507(1)
Accessibility in HTML Tables
508(4)
Accessibility in HTML Frames
512(1)
Accessibility in XML
512(1)
Using Voice Synthesis and Recognition with VoiceXML™
513(7)
JAWS® for Windows
520(1)
Other Accessibility Tools
521(1)
Internet and World Wide Web Resources
522(5)
XHTML and XForms
527(12)
Introduction
528(1)
XHTML
528(6)
XForms
534(1)
Extended Forms Architecture (XFA)
535(1)
Internet and World Wide Web Resources
535(4)
Custom Markup Languages: Part I
539(42)
Introduction
540(1)
Mathematical Markup Language (MathML)
540(3)
OpenMath
543(1)
Chemical Markup Language (CML)
543(5)
Wireless Markup Language (WML)
548(3)
Geography Markup Language (GML)
551(2)
Synchronized Multimedia Integration Language (SMIL)
553(4)
Scalable Vector Graphics (SVG)
557(5)
Bean Markup Language (BML)
562(8)
Extensible 3D Language (X3D)
570(4)
Additional Internet and World Wide Web Resources
574(7)
Custom Markup Languages: Part II
581(20)
Introduction
582(1)
Extensible Business Reporting Language (XBRL)
582(4)
Bank Internet Payment System (BIPS)
586(1)
Electronic Business XML (ebXML)
586(1)
Visa XML Invoice Specification
587(1)
Commerce XML (cXML)
587(5)
LegalXML
592(1)
NewsML
593(1)
Open eBook Publication Structure
594(1)
Extensible User Interface Language (XUL)
595(1)
Internet and World Wide Web Resources
595(6)
XML Technologies and Applications
601(25)
Introduction
602(1)
XML Query Language (XML Query)
603(1)
Directory Services Markup Language (DSML)
603(1)
Resource Definition Framework (RDF)
604(4)
XML Topic Maps (XTM)
608(4)
Virtual HyperGlossary (VHG)
612(1)
Channel Definition Format (CDF)
612(4)
Information and Content Exchange (ICE) Protocol
616(1)
Rich Site Summary (RSS)
617(1)
Platform for Privacy Preferences (P3P)
617(1)
Blocks Extensible Exchange Protocol (BXXP)
618(1)
XML Digital Signatures
619(1)
Extensible Rights Markup Language (XrML)
619(1)
XML Metadata Interchange (XML)
620(1)
W3C's XML Protocol
621(1)
XAML
621(5)
Simple Object Access Protocol (SOAP) and Microsoft BizTalk™
626(14)
Introduction
627(1)
Simple Object Access Protocol (SOAP)
627(6)
Microsoft BizTalk
633(3)
BizTalk Framework
634(1)
BizTalk Server
634(2)
BizTalk Schema Library
636(1)
Microsoft BizTalk Server 2000
636(1)
Internet and World Wide Web Resources
636(4)
Bonus Chapter: Introduction to Scripting with VBScript&red;
640(33)
Introduction
641(1)
Operators
641(2)
Data Types and Control Structures
643(5)
VBScript Functions
648(3)
VBScript Example Programs
651(8)
Arrays
659(4)
String Manipulation
663(4)
Internet and World Wide Web Resources
667(6)
Bonus Chapter: Introduction to Active Server Pages (ASP)
673(50)
Introduction
674(1)
How Active Server Pages Work
674(2)
Client-side Scripting versus Server-side Scripting
676(1)
Using Personal Web Server and Internet Information Server
676(1)
Active Server Page Objects
677(1)
A Simple ASP Example
678(2)
Server-side ActiveX Components
680(5)
File System Objects
685(8)
Session Tracking and Cookies
693(11)
Databases, SQL, Microsoft UDA and ADO
704(5)
Accessing a Database from and Active Server Page
709(9)
Internet and World Wide Web Resources
718(5)
Bonus Chapter: Introduction to Perl Programming
723(43)
Introduction
724(1)
Perl
725(5)
String Processing and Regular Expressions
730(5)
Viewing Client/Server Environment Variables
735(3)
Form Processing and Business Logic
738(5)
Server-Side Includes
743(4)
Verifying a Username and Password
747(5)
Using ODBC to Connect to a Database
752(4)
Cookies and Perl
756(5)
Internet and World Wide Web Resources
761(5)
Bonus Chapter: Introduction to Java 2 Programming
766(97)
Introduction
768(1)
Java Keywords, Primitive Data Types and Class Libraries
768(4)
Command-Line Java Applications
772(12)
Printing a Line of Text at the Command Line
772(4)
Using a Dialog Box from a Command-Line Application
776(4)
Another Java Application: Adding Integers
780(4)
Arrays
784(7)
Class Vector
791(1)
Graphical User Interfaces: A Windowed Application with JFrames and Event Handling
792(7)
Graphical User Interfaces: Event Handling with Inner Classes
799(9)
Graphical User Interfaces: Miscellaneous Components
808(5)
Class JComboBox
808(2)
JList
810(3)
Graphical User Interfaces: Layout Managers
813(6)
BorderLayout
813(4)
GridLayout
817(2)
Graphical User Interfaces: Customizing a Component and Introducing Graphics
819(4)
Multithreading
823(7)
Class Thread: An Overview of the Thread Methods
823(1)
Thread States: Life Cycle of a Thread
824(2)
Thread Priorities and Thread Scheduling
826(1)
Creating Threads in an Application
827(3)
Networking with Sockets and Streams
830(12)
Establishing a Simple Server (Using Stream Sockets)
831(1)
Establishing a Simple Client (Using Stream Sockets)
832(1)
Client/Server Interaction with Stream Socket Connections
833(9)
Enhancing a Web Server with Servlets
842(10)
Overview of Servlet Technology
843(1)
Servlet API
844(1)
HttpServlet Class
845(1)
HttpServletRequest Interface
845(1)
HttpServletResponse Interface
846(1)
Multi-tier Client/Server Application with Servlets
847(5)
Internet and World Wide Web Resources
852(11)
A HTML Special Characters 863(1)
B HTML Colors 864(3)
C ASCII Character Set 867(1)
D Operator Precedence Charts 868(7)
E Number Systems 875(13)
Introduction
876(3)
Abbreviating Binary Numbers as Octal Numbers and Hexadecimal Numbers
879(1)
Converting Octal Numbers and Hexadecimal Numbers to Binary Numbers
880(1)
Converting from Binary, Octal, or Hexadecimal to Decimal
880(1)
Converting from Decimal to Binary, Octal, or Hexadecimal
881(1)
Negative Binary Numbers: Two's Complement Notation
882(6)
F Career Resources 888(17)
Introduction
889(1)
On-line Career Services
890(2)
Career Opportunities for Employees
892(4)
Comprehensive Career Sites
892(1)
Technical Positions
892(1)
Contracting On-line
893(1)
Executive Positions
894(1)
Students and Young Professionals
894(1)
Other On-line Career Services
895(1)
On-line Opportunities for Employers
896(3)
Posting Jobs On-line
896(1)
Diversity in the Workplace
897(1)
Recruiting Services
898(1)
Testing Potential Employees On-line
899(1)
Internet and World Wide Web Resources
899(6)
Bibliography 905(2)
Index 907

Excerpts

Preface Live in fragments no longer. Only connect. Edward Morgan Forster Welcome to the exciting world of XML! This book is by an old guy and four young guys. The old guy (HMD; Massachusetts Institute of Technology 1967) has been programming and/or teaching programming for 40 years. The four young guys (PJD; MIT 1991, TRN; MIT 1992, TML; Carnegie Mellon 2001, PS; Northeastern 2000) have each been programming and/or teaching programming for many years. The old guy programs and teaches from experience; the young guys do so from an inexhaustible reserve of energy. The old guy wants clarity; the young guys want performance. The old guy seeks elegance and beauty; the young guys want results. We got together to produce a book we hope you will find informative, challenging and entertaining. Why We Wrote XML How to Program Today, XML is arguably the hottest technology in the computer industry. Therefore, university professors are eager to incorporate XML into their undergraduate and graduate Internet, Web, e-business and e-commerce curricula. Professionals are eager to use XML in their industrial-strength information-technology applications. Students are highly motivated by the fact that they are learning a leading-edge technology (XML) that will be immediately useful to them as they leave the university environment and head into a world where the Internet and World Wide Web have a massive prominence. After mastering the material in this book, students will be well prepared to take advantage of the Internet and the Web as they take upper-level courses and venture into the rapidly changing programming world. XML How to Programis the latest book in the Deitel/Prentice Hall How to Programseries. It is distinguished by its focus on XML-based application development using programming languages such as Java, VBScript and Perl. We have syntax-colored the code throughout the book. The key focus of this book is applications development with XML. Our audiences care about XML processing on the client, XML processing on the server, using XML encoded data as a database, etc. Many XML books are reference manuals with exhaustive listings of features. That is not our style. We concentrate on creating real, working applications. We provide the live-codeexamples on the CD accompanying this book (and on www.deitel.com) so that you can run the applications and see the results. We are excited about the enormous range of possibilities XML has to offer. We performed extensive research for this book and located hundreds of Internet and Web resources (which we provide as live links on the CD-ROM that accompanies this book and on www.deitel.com) to help you learn about XML and its related technologies. These links include general information, tutorials and demonstrations. Please read the tour of the book in Chapter 1 to familiarize yourself with the XML technologies we present. A cutting-edge technology, XML is constantly evolving. This creates tremendous challenges for us as authors, for our publisher--Prentice Hall, for instructors, and for students and professional people. We have worked hard to create useful live-codeexamples to help you master XML quickly and effectively. All of the code examples are on the accompanying disk and are available for free download from our Web sites: www.deitel.com www.prenhall.com/deitel Teaching Approach XML How to Programcontains a rich collection of examples and exercises drawn from many fields to provide the student with a chance to solve interesting real-world problems. The book concentrates on the principles of good software engineering and stresses clarity. We avoid arcane terminology and syntax specifications in favor of teaching by example. The book is written by educators who spend most of their time writing about and teaching edge-of-the-practice programming topics. Live-CodeTeaching Approach The book is loaded with live-codeexamples. This is the focus of the way we teach and write about programming, and the focus of our multimedia Cyber Classroomsand Web-Based Training Coursesas well. Each new concept is presented in the context of a complete, working program immediately followed by one or more windows showing the program''s input/output dialog. We call this style of teaching and writing our live-code approach. We use programming languages to teach programming languages.Reading these programs is much like entering and running them on a computer. XML How to Programshows how to create Web sites starting with HTML programming, then rapidly proceeding to programming in XML. HTML and XML are considered to be markup languages rather than programming languages, but many of our examples use XML in the context of Java, VBScript, Active Server Pages, Perl and JavaScript. For those readers who wish to review these programming technologies, we include full-chapter introductions to VBScript, Active Server Pages, Perl and Java. The Java treatment is especially substantial. World Wide Web Access All of the code for XML How to Program(and our other publications) is on the Internet free for download at the Deitel & Associates, Inc. Web site -- www.deitel.com Please download all the code and run each program as you read the text. Make changes to the code examples and immediately see the effects of those changes. It is a great way to learn programming. Note:You must respect the fact that this is copyrighted material. Feel free to use it as you study, but you may not republish any portion of it in any form without explicit permission from Prentice Hall and the authors. Objectives Each chapter begins with a statement of Objectives.This tells students what to expect and gives them an opportunity, after reading the chapter, to determine if they have met these objectives. It is a confidence builder and a source of positive reinforcement. Quotations The learning objectives are followed by quotations. Some are humorous, some are philosophical, and some offer interesting insights. Our students enjoy relating the quotations to the chapter material. Many of the quotations are worth a "second look" afteryou read each chapter. Outline The chapter Outlinehelps students approach the material in top-down fashion. This, too, helps students anticipate what is to come and set a comfortable and effective learning pace. Example XML documents (with Program Outputs) We present features in the context of complete, working XML documents. This is the focus of our teaching and our writing. We call it our live-codeapproach. Each Web document is followed by the outputs produced when the document is rendered in a Web browser (We use both Microsoft''s Internet Explorer 5 and Netscape 6) and its scripts are executed. This enables students to confirm that the Web pages are rendered as expected. Reading the book carefully is much like entering the code and rendering these documents on a computer. The documents range from just a few lines of code to substantial examples with several hundred lines of code. Students should download all the code for the book from our Web site, and run each program while studying that program in the text. Illustrations/Figures An abundance of charts, line drawings and program outputs is included. Programming Tips We have included programming tips to help students focus on important aspects of program development. We highlight these tips in the form of Good Programming Practices, Common Programming Errors, Testing and Debugging Tips, P

Rewards Program

Write a Review