Chapter 3. Manipulating XML Structures

In this chapter, we will cover:

  • Reading simple XML files
  • Specifying fields by using XPath notation
  • Validating well-formed XML files
  • Validating an XML file against DTD definitions
  • Validating an XML file against an XSD schema
  • Generating a simple XML document
  • Generating complex XML structures
  • Generating an HTML page using XML and XSL transformations

Introduction

XML is a markup language designed to describe data, the opposite of HTML which was designed only to display data. It is a self-descriptive language because its tags are not predefined. XML documents are not only used to store data, but also to exchange data between systems.

XML is recommended by W3C. You will find the details at the following URL:

http://www.w3.org/XML/

PDI has a rich set of steps and job entries for manipulating XML structures. The recipes in this chapter are meant to teach you how to read, write, and validate XML using those features.

Note

Most of the recipes are based on a database with books and authors. To learn more about the structure of that database, see the Appendix, Data Structures, or the examples in Chapter 1,

The recipes assume that you know the basics of XML, that is, you know what XML is, what an attribute is, and so on. If you don't, you should start by reading something about it before proceeding. The following tutorial is a good start:

http://www.w3schools.com/xml/

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.27.171