Beginning XML with DOM and Ajax (eBook)

From Novice to Professional

(Autor)

eBook Download: PDF
2006 | 1st ed.
XX, 456 Seiten
Apress (Verlag)
978-1-4302-0177-9 (ISBN)

Lese- und Medienproben

Beginning XML with DOM and Ajax - Sas Jacobs
Systemvoraussetzungen
46,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

This book gives the most up-to-date picture of the topic-XML support in the most modern web browsers, creating XML-driven applications using the most versions of web standards and server-side languages, including CSS 2.1/3, DOM, XSLT and XPath 2, PHP 5, ASP.NET 2, and many more. The book shows that you can give the reader all they need to know to hit the ground running, without making them trawl through hundreds of pages of syntax. The book also provides an introduction to Ajax-style programming, which is an essential topic for modern web developers to understand. XML is core to Ajax, so an understanding of it is essential when learning how to program Ajax functionality. This book therefore provides a great stepping stone for readers wishing to take this path.



Sas Jacobs is a Web developer who loves working with Flash. She set up her business Anything Is Possible in 1994, working in the areas of web development, information technology training and technical writing. The business works with large and small clients building web applications with ASP.NET, Flash, XML and databases. Sas has also spoken at conferences such as Flash Forward, MXDU and FlashKit on topics relating to XML and dynamic content in Flash. In her spare time, Sas is passionate about travelling, photography and enjoying life. One of her most fervent wishes is that Flash will take over the Web!
Don't waste time on 1,000-page tomes full of syntax; this book is all you need to get ahead in XML development. Renowned web developer Sas Jacobs presents an essential guide to XML. Beginning XML with DOM and Ajax is practical and comprehensive. It includes everything you need to know to get up to speed with XML development quickly and painlessly.Jacobs begins by presenting an overview of XMLits syntax, rules, vocabularies, and the hows and whys of validity. She also covers the current state of XML support in todays web browsers. Next, Jacobs covers all of the basic essential uses of XML. You’ll learn how to display XML data using CSS, and transform XML data using XSLT. You’ll even learn about dynamic XML scripting using the XML DOM.The last part of the book covers advanced server-side XML uses in real-world applications, including displaying XML data in Flash, and XML-driven PHP and ASP.NET applications. And last but not least, Jacobs provides a perfect introduction to Ajax development.

Sas Jacobs is a Web developer who loves working with Flash. She set up her business Anything Is Possible in 1994, working in the areas of web development, information technology training and technical writing. The business works with large and small clients building web applications with ASP.NET, Flash, XML and databases. Sas has also spoken at conferences such as Flash Forward, MXDU and FlashKit on topics relating to XML and dynamic content in Flash. In her spare time, Sas is passionate about travelling, photography and enjoying life. One of her most fervent wishes is that Flash will take over the Web!

Contents 5
About the Author 12
About the Technical Reviewer 13
Acknowledgments 14
Introduction 15
Chapter 1 Introduction to XML 16
What Is XML? 17
A Brief History of XML 17
The Goals of XML 18
Understanding XML Syntax 19
Well-Formed Documents 19
Understanding the Difference Between Tags and Elements 20
Viewing a Complete XML Document 21
Understanding the Structure of an XML Document 22
Naming Rules in XML 23
Understanding the XML Document Prolog 24
Understanding Sections Within the XML Document Element 26
The XML Processing Model 31
XML Processing Types 32
DOM Parsing 32
SAX Parsing 32
Why Have Two Processing Models? 33
Some XML Tools 33
Summary 34
Chapter 2 Related XML Recommendations 35
Understanding the Role of XML Namespaces 35
Adding Namespaces to XML Documents 37
Adding Default Namespaces 37
Defining XML Vocabularies 38
The Document Type Definition 39
XML Schema 43
Comparing DTDs and Schemas 50
Other Schema Types 51
XML Vocabularies 51
Displaying XML 52
XML and CSS 53
XSL 53
XPath 58
XPath Expressions 59
Identifying Specific Nodes 60
Including Calculations and Functions 60
XPath Summary 61
Linking with XML 61
Simple Links 62
Extended Links 63
XPointer 64
XML Links Summary 65
Summary 65
Chapter 3 Web Vocabularies 66
XHTML 66
Separation of Presentation and Content 67
XHTML Construction Rules 69
XHTML Tools 79
Well-Formed and Valid XHTML Documents 80
XHTML Modularization 85
MathML 86
Presentation MathML 86
Content MathML 89
Scalable Vector Graphics 90
Vector Graphic Shapes 91
Text 94
Putting It Together 95
Web Services 99
WSDL 99
SOAP 105
Other Web Vocabularies 109
RSS and News Feeds 109
VoiceXML 110
SMIL 110
Database Output Formats 110
Summary 111
Chapter 4 Client-Side XML 112
Why Use Client-Side XML? 112
Working with XML Content Client-Side 113
Styling Content in a Browser 113
Manipulating XML Content in a Browser 114
Working with XML in Flash 115
Examining XML Support in Major Browsers 116
Understanding the W3C DOM 116
Understanding the XML Schema Definition Language 117
Understanding XSLT 117
Microsoft Internet Explorer 117
Adobe (Formerly Macromedia) Flash 128
Choosing Between Client and Server 129
Using Client-Side XML 130
Using Server-Side XML 130
Summary 133
Chapter 5 Displaying XML Using CSS 134
Introduction to CSS 135
Why CSS? 135
CSS Rules 135
Styling XHTML Documents with CSS 137
Styling XML Documents with CSS 142
Attaching the Stylesheet 143
Selectors 143
Layout of XML with CSS 144
Understanding the W3C Box Model 145
Positioning in CSS 148
Displaying Tabular Data 163
Working with Display Properties 163
Working with Floating Elements 165
Table Row Spans 167
Linking Between Displayed XML Documents 167
XLink in Netscape and Firefox 168
Forcing Links Using the HTML Namespace 170
Adding Images in XML Documents 171
Adding Images with Netscape and Firefox 171
Using CSS to Add an Image 172
Using CSS to Add Content 173
Working with Attribute Content 175
Using Attributes in Selectors 176
Using Attribute Values in Documents 177
Summary 179
Chapter 6 Introduction to XSLT 181
Browser Support for XSLT 181
Using XSLT to Create Headers and Footers 182
Understanding XHTML, XSLT, and Namespaces 184
Creating the XSLT Stylesheet 184
Understanding the Stylesheet 186
Transforming the < body>
Applying the Transformation 187
Adding the Footer 187
Transformation Without Change 187
Creating a Table of Contents 188
Selecting Each Planet with < xsl:for-each>
Adding a New Planet 192
Presenting XML with XSLT 193
Moving from XHTML to XML 194
Styling the XML with XSLT 194
Removing Content with XSLT 196
Understanding the Role of XPath in XSLT 197
Including Images 198
Importing Templates 199
Including Templates 200
Tools for XSLT Development 200
Summary 202
Chapter 7 Advanced Client-Side XSLT Techniques 203
Sorting Data Within an XML Document 203
Sorting Dynamically with JavaScript 208
Adding Extension Functions (Internet Explorer) 215
Understanding More About Namespaces 217
Adding Extension Functions to the Stylesheet 218
Providing Support for Browsers Other Than IE 221
Working with Named Templates 222
Generating JavaScript with XSLT 225
Understanding XSLT Parameters 227
Understanding White Space and Modes 227
Working Through the onelinehtml Template 229
Finishing Off the Page 230
Generating JavaScript in Mozilla 231
XSLT Tips and Troubleshooting 232
Dealing with White Space 232
Using HTML Entities in XSLT 234
Checking Browser Type 234
Building on What Others Have Done 235
Understanding the Best Uses for XSLT 235
Summary 236
Chapter 8 Scripting in the Browser 237
The W3C XML DOM 237
Understanding Key DOM Interfaces 239
Examining Extra Functionality in MSXML 250
Browser Support for the W3C DOM 253
Using the xDOM Wrapper 253
xDOM Caveats 258
Using JavaScript with the DOM 258
Creating DOM Document Objects and Loading XML 259
XSLT Manipulation 263
Extracting Raw XML 265
Manipulating the DOM 265
Putting It into Practice 269
Understanding the Application 269
Examining the Code 270
Dealing with Large XML Documents 274
Summary 276
Chapter 9 The Ajax Approach to Browser Scripting 277
Understanding Ajax 278
Explaining the Role of Ajax Components 278
Understanding the XMLHttpRequest Object 279
Putting It Together 288
Username Validation with the XMLHttpRequest Object 288
Contacts Address Book Using an Ajax Approach 291
Using Cross-Browser Libraries 296
Other Ajax Frameworks and Toolkits 299
Backbase 299
Bindows 299
Dojo 299
Interactive Website Framework 299
qooxdoo 299
Criticisms of Ajax 300
Providing Visual Cues 300
Updating the Interface 300
Preloading Data 301
Providing Links to State and Enabling the Back Button 301
Ajax Best Practices and Design Principles 301
Minimizing Server Traffic 302
Using Standard Interface Methods 302
Using Wrappers or Libraries 302
Using Ajax Appropriately 302
Summary 302
Chapter 10 Using Flash to Display XML 304
The XML Class 305
Loading an XML Document 305
Understanding the XML Class 308
Understanding the XMLNode Class 309
Loading and Displaying XML Content in Flash 312
Updating XML Content in Flash 316
Sending XML Content from Flash 320
Using the XMLConnector Component 321
Loading an XML Document 322
Data Binding 324
Updating XML Content with Data Components 326
Understanding Flash Security 327
Summary 327
Chapter 11 Introduction to Server-Side XML 328
Server-Side vs. Client-Side XML Processing 328
Server-Side Languages 329
.NET 330
PHP 332
Working Through Simple Examples 334
The XML Document 335
Transforming the XML 335
Adding a New DVD 342
Modifying an Existing DVD 350
Deleting a DVD 357
Summary 359
Chapter 12 Case Study: Using .NET for an XML Application 360
Understanding the Application 360
Setting Up the Environment 361
Understanding the Components of the News Application 363
Summary 391
Chapter 13 Case Study: Using PHP for an XML Application 392
Understanding the Application 392
Setting Up the Environment 392
Understanding Components of the Weather Portal Application 399
Summary 427
Index 428

Erscheint lt. Verlag 30.11.2006
Zusatzinfo XX, 456 p.
Verlagsort Berkeley
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Web / Internet
Schlagworte ASP.NET • Design • Development • language • .NET • programming • SQL • Standards • XML
ISBN-10 1-4302-0177-0 / 1430201770
ISBN-13 978-1-4302-0177-9 / 9781430201779
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 8,2 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Das Handbuch für Ausbildung und Beruf

von Vivian Pein

eBook Download (2024)
Rheinwerk Computing (Verlag)
29,90