1. Trang chủ
  2. » Công Nghệ Thông Tin

Beginning XML with DOM and Ajax From Novice to Professional phần 1 pps

46 400 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 46
Dung lượng 1,2 MB

Nội dung

[...]... invaluable reference to XML and that, through it, you see the incredible power and flexibility that XML offers to web developers xix 6765FM.qxd 5 /19 /06 11 :03 AM Page xx 6765CH 01. qxd 5 /19 /06 11 : 21 AM CHAPTER Page 1 1 Introduction to XML T his chapter introduces you to Extensible Markup Language (XML) and explains some of its basic concepts It’s an ideal place to start if you’re completely new to XML The concepts... within the XML document You’re free to use any name for elements and attributes, providing that they conform to the rules for XML names Figure 1- 1 shows the structure of an XML document 7 6765CH 01. qxd 8 5 /19 /06 11 : 21 AM Page 8 CHAPTER 1 ■ INTRODUCTION TO XML Figure 1- 1 The structure of an XML document Naming Rules in XML Elements, attributes, and some other constructs have names within XML documents... information about the version, encoding, and whether the document is standalone: < ?xml version= "1. 0" encoding="UTF-8" standalone="yes"?> 9 6765CH 01. qxd 10 5 /19 /06 11 : 21 AM Page 10 CHAPTER 1 ■ INTRODUCTION TO XML At the time of writing, the current XML version is 1. 1 However, many processors don’t recognize this version, so it’s best to stick with a version 1. 0 declaration for backward compatibility... (MathML), and Scalable Vector Graphics (SVG) The middle section of the book deals with client-side XML applications and shows how to display and transform XML documents with CSS and XSLT This section also explores how the current web browsers support XML, and it covers how to use JavaScript to work with XML documents In this section, I also provide an introduction to the Asynchronous JavaScript and XML (Ajax) ... you finish this chapter, you should have a good understanding of XML and see where you might be able to use it in your work I’ll start by explaining exactly what XML is and where it fits into the world of web development 1 6765CH 01. qxd 2 5 /19 /06 11 : 21 AM Page 2 CHAPTER 1 ■ INTRODUCTION TO XML What Is XML? The first and most important point about XML is that it’s not a language itself Rather, it’s a... yourself to the uppercase and lowercase letters of the Roman alphabet, numbers, and punctuation, excluding the colon 6765CH 01. qxd 5 /19 /06 11 : 21 AM Page 9 CHAPTER 1 ■ INTRODUCTION TO XML If you’re authoring your own XML content as opposed to generating it automatically, it’s probably a good idea to adopt a standardized naming convention You should also use descriptive names I prefer to write in CamelCase and. .. rules, it’s time to look at a complete XML document 5 6765CH 01. qxd 6 5 /19 /06 11 : 21 AM Page 6 CHAPTER 1 ■ INTRODUCTION TO XML Viewing a Complete XML Document A complete piece of XML is referred to as a document It doesn’t matter whether you’re dealing with XML that marks up text, information requested from a server, or records received from a database—all of these are documents Each XML document is made... within the same element: Here is an element 13 6765CH 01. qxd 14 5 /19 /06 11 : 21 AM Page 14 CHAPTER 1 ■ INTRODUCTION TO XML Make sure you don’t include one of each in a single attribute, or the document won’t be well formed ■ Caution Be careful when cutting and pasting attributes from a word-processing document into an XML document Word processors often... clients building web applications with NET, Flash, XML, and databases Sas has spoken at such conferences as Flashforward, webDU (previously known as MXDU), and FlashKit on topics related to XML and dynamic content in Flash In her spare time, Sas is passionate about traveling, photography, running, and enjoying life xiii 6765FM.qxd 5 /19 /06 11 :03 AM Page xiv 6765FM.qxd 5 /19 /06 11 :03 AM Page xv About the Technical... starts with an XML declaration: < ?xml version= "1. 0" encoding="UTF-8"?> This declaration is optional and can contain a number of attributes, as you’ll see shortly 6765CH 01. qxd 5 /19 /06 11 : 21 AM Page 7 CHAPTER 1 ■ INTRODUCTION TO XML This XML document also includes a comment describing its purpose: XML document describes a DVD library > I’ve added this comment as a guide for anyone reading the XML . w0 h0" alt="" Sas Jacobs Beginning XML with DOM and Ajax From Novice to Professional 6765FM.qxd 5 /19 /06 11 :03 AM Page i Beginning XML with DOM and Ajax: From Novice to Professional Copyright ©. Language (MathML), and Scalable Vector Graphics (SVG). The middle section of the book deals with client-side XML applications and shows how to display and transform XML documents with CSS and XSLT. This. browsers support XML, and it covers how to use JavaScript to work with XML doc- uments. In this section, I also provide an introduction to the Asynchronous JavaScript and XML (Ajax) approach. The

Ngày đăng: 14/08/2014, 10:22

TỪ KHÓA LIÊN QUAN