tailieunhanh - XML Step by Step- P4
XML Step by Step- P4:Extensible Markup Language, or XML, is currently the most promising language for storing and exchanging information on the World Wide Web. Although Hypertext Markup Language (HTML) is presently the most common language used to create Web pages, HTML has a limited capacity for storing information. In contrast, 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 database | 38 XML Step by Step Display the AUTHOR element in bold font-weight bold . Do not display the PAGES element display none . File Name BOOK display block margin-top 12pt font-size 10pt TITLE display block font-size 12pt font-weight bold font-style italic AUTHOR display block margin-left 15pt font-weight bold BINDING display block margin-left 15pt PAGES display none PRICE display block margin-left 15pt Listing 2-4. 9 In your text editor open the document. Add the following processing instruction to the end of the document prolog directly above the INVENTORY element Chapter 2 Creating and Displaying Your First XML Document 39 xml-stylesheet type text css href This processing instruction links the new CSS you just created to the XML document. 10 To reflect the new filename you re going to assign change the comment near the beginning of the document from -- File Name -- to -- File Name -- Listing 2-5 shows the complete XML document. You ll find a copy of this listing on the companion CD under the filename . 11 Use your text editor s Save As command to save a copy of the modified document under the filename . Be sure to save it in the same file folder in which you saved . xml version -- File Name -- xml-stylesheet type text css href INVENTORY BOOK TITLE The Adventures of Huckleberry Finn TITLE AUTHOR Mark Twain AUTHOR BINDING mass market paperback BINDING PAGES 298 PAGES PRICE PRICE BOOK BOOK TITLE Leaves of Grass TITLE AUTHOR Walt Whitman AUTHOR BINDING hardcover BINDING PAGES 462 PAGES PRICE PRICE BOOK BOOK TITLE The Legend of Sleepy Hollow TITLE AUTHOR Washington Irving AUTHOR BINDING mass market paperback BINDING Your First XML Document 2 40 XML Step by Step PAGES 98 PAGES PRICE PRICE BOOK BOOK TITLE The Marble Faun TITLE AUTHOR Nathaniel Hawthorne AUTHOR BINDING trade
đang nạp các trang xem trước