175 PART III PROCESSING CHAPTER 7 Extracting Data from XML.. 773 APPENDIX C XML Schema Data Types... In this chapter you’ve learned about the following: ➤ Much of today’s data comes i
Trang 3BEGINNING XML
INTRODUCTION xxvii
PART I INTRODUCING XML CHAPTER 1 What Is XML? 3
CHAPTER 2 Well-Formed XML 25
CHAPTER 3 XML Namespaces 53
PART II VALIDATION CHAPTER 4 Document Type Defi nitions 83
CHAPTER 5 XML Schemas 117
CHAPTER 6 RELAX NG and Schematron 175
PART III PROCESSING CHAPTER 7 Extracting Data from XML 211
CHAPTER 8 XSLT 239
PART IV DATABASES CHAPTER 9 XQuery 307
CHAPTER 10 XML and Databases 341
PART V PROGRAMMING CHAPTER 11 Event-Driven Programming 403
CHAPTER 12 LINQ to XML 451
PART VI COMMUNICATION CHAPTER 13 RSS, Atom, and Content Syndication 485
CHAPTER 14 Web Services 539
CHAPTER 15 SOAP and WSDL 573
CHAPTER 16 AJAX 615
Trang 4PART VII DISPLAY
CHAPTER 17 XHTML and HTML 5 649
CHAPTER 18 Scalable Vector Graphics (SVG) 689
PART VIII CASE STUDY CHAPTER 19 Case Study: XML in Publishing 727
APPENDIX A Answers to Exercises 749
APPENDIX B XPath Functions 773
APPENDIX C XML Schema Data Types 797
INDEX 811
Trang 5XML
Trang 6In this chapter you’ve learned about the following:
➤ Much of today’s data comes in the form of tabular data and XML combined
➤ You need a dedicated storage type for XML rather than just use a text fi eld You also need methods to extract specifi c values and fragments of XML as well as methods to create new XML formats combining the relational and XML data You will probably want the facility
to update XML documents although this is not always a necessity
➤ A relational database handles both tabular data and XML documents, whereas a native XML database is designed to cope solely with XML documents
➤ High-end systems such as Oracle and SQL Server XML have their own data type and there are suitable methods available on these types for retrieval and manipulation of the XML
➤ The features available in a native XML database include the ability to store large document collections as well as the ability to effi ciently query across these documents
EXERCISES
You can fi nd suggested answers to these questions in Appendix A
1. List the main reasons to choose a relational database with XML features over a native XML database
2. What fi ve methods are available against an XML data type? (No peeking!)
3. MySQL has only two XML-related functions If you could ask for one more feature or function, what would it be?
Trang 7WHAT YOU LEARNED IN THIS CHAPTER
Storage needs There is a big diff erence between relational data, data in a tabular
for-mat, and XML data Therefore, special mechanisms are needed to store XML within relational systems.
Essential features in
databases.
XML needs to be stored in a native format, rather than as text There must also be ways to query it for specifi c values and a way to return frag-ments of XML Ideally there should also be a way to treat XML as tabular data if possible.
Choosing an
application
Most commercial relational databases have fairly advanced XML fea-tures, particularly Oracle and SQL Server Native XML databases are designed to cope with the situation in which all data is held as XML.