Books‎ > ‎Computing‎ > ‎Languages‎ > ‎

XML

This book aims to answer these questions: What is XML? How do you use XML? How does it work? What can you use it for?

It contains an overview of each XML technology and how it arose, but most examples use the latest version available. The examples are from more than one platform, mostly Java and .NET.
 
XML products have evolved; at one time there were many free and commercial Extensible Stylesheet Language Transformation (XSLT) processors; for example, XSLT is used to manipulate XML, changing it from one structure to another, but since version 2 appeared the number has reduced as the work needed to develop and maintain the software has risen.

Subjects covered in this book are arranged to lead you along the path of novice to expert. 

Part I: Introduction 

The chapters in this part cover the goals of XML and the rules for constructing it. This part will enable you to understand the basic concepts and terminology. If you are already familiar with XML, you can probably just 
skim these chapters.

Chapter 1: What Is XML? — the history of XML and why it is needed, and the rules for creating XML documents.

Chapter 2: Well-Formed XML — What is and isn’t allowed for an XML document. It covers the naming system that is used to describe the different constituent parts of an XML document.

Chapter 3: XML Namespaces — a clear explanation of namespaces.

Part II: Validation

The techniques that help you verify that the XML you’ve created, or received, is in the correct format.

Chapter 4: Document Type Definitions — DTDs are the original validation mechanism for XML. This chapter shows how they are used to both constrain the document and to supply additional content.

Chapter 5: XML Schemas — XML Schemas are the more modern way of describing an XML document’s format. This chapter examines how they work and discusses the advantages and disadvantages over DTDs.

Chapter 6: RELAX NG and Schematron — Sometimes neither DTDs nor schemas provide what you need. This chapter discusses two other methods by which you can check if your XML is valid, and also includes examples of mixing more than one  validation technique.

Part III: Processing

This section covers retrieving data from an XML document and transforming one format of XML to another. Included is a thorough grounding in XPath, one of the cornerstones of many XML technologies.

Chapter 7: Extracting Data from XML — covers the document object model (DOM), one of the earliest ways devised to extract data from XML. It describes XPath, one of the cornerstone XML technologies that can be used to pinpoint one or many items of interest.

Chapter 8: XSLT — XSLT is a way to transform XML from one format to another, essential if you are receiving documents from external sources and need your own systems to be able to read them. It covers the basics of version 1, the more advanced features of the current version, and shows a little of what’s scheduled in the next release.

Part IV: Databases

For many years there has been a disparity between data held in a database and that stored as XML. This part brings the two together and shows how you can have the best of both worlds.

Chapter 9: XQuery — XQuery is a mechanism designed to query existing documents and create new XML documents. It works especially well with XML data that is stored in databases, and this chapter shows how that’s done.

Chapter 10: XML and Databases — Many database systems now have functionality designed especially for XML. This chapter examines three such products and shows how you can both query and update existing data as well as create new XML, should the need arise.

Part V: Programming

This part looks at two programming techniques for handling XML. Chapter 11 covers dealing with large documents, and Chapter 12 shows how Microsoft’s latest universal data access strategy, LINQ, can be used with XML.

Chapter 11: Event-Driven Programming — This chapter looks at two different ways of handling XML that are especially suited to processing large files. One is based on an open source API and the examples are implemented in Java. The second is a key part 
of Microsoft’s .NET Framework and shows examples in C#.

Chapter 12: LINQ to XML — This chapter shows Microsoft’s latest way of handling XML, from creation to querying and transformation. It contains a host of examples that use both C# and VB.NET, which, for once, currently has more features than its .NET cousin.

Part VI: Communication

This part deals with using XML as a means of communication and presenting data in a way that many different systems can utilize and then shows how web services can make data available to a variety of different clients. It concludes with a discussion on how complex data can be described in a standard way that’s accessible to all.ways in which content, such as news feeds, is presented in a platform-independent fashion. It covers how the same XML format can be used to present structured data such as customer listings or sales results.

Chapter 14: Web Services — there has been a growth in the use of web services and this chapter examines how they work and where XML fits in.

Chapter 15: SOAP and WSDL — a further look at web services and the two major systems used within them: SOAP, which dictates how services are called, and Web Services Description Language (WSDL), which is used to describe what a web service has to offer.

Chapter 16: AJAX — how it can help your website provide up-to-the-minute information, yet remain responsive and use 
less bandwidth. As well as how XML is involved, this chapter examines the situations when you’d want to abandon XML and use an alternative technology.

Part VII: Display

This part shows two ways in which XML can help display information in a user-friendly form as well as in a format that can be read by a machine.

Chapter 17: XHTML and HTML 5 — This chapter covers how and where to use XHTML and why it is preferred over traditional HTML. It goes on to show the newer features of HTML 5 and how it has removed some of these obstacles.

Chapter 18: Scalable Vector Graphics (SVG) — This chapter shows how images can be stored in an XML format and what the advantages are to this method. It shows how this format can be combined with others, such as HTML, and why you would do this.

Part VIII: Case Study

This part contains a case study that ties in the many uses of XML and shows how they would interact in a real-world example.

Chapter 19: Case Study: XML in Publishing — The case study shows how a fictional publishing house goes from proprietary-based publishing software to an XML-based workflow and what benefit this brings to the business.

The three appendices contain reference material and solutions to the end-of-chapter exercises.

Appendix A: Answers to Exercises — solutions and suggestions for the end-of-chapter exercises in the book.

Appendix B: XPath Functions — This appendix contains information on the majority of XPath functions, their signatures, return values, and examples of how and where you would use them.

Appendix C: XML Schema Data Types — This appendix contains information on the numerous built-in data types defined by XML Schema. It shows how they are related and how they can be constrained by different facets.
Comments