The Java EE 5 Tutorial

Example XML Document

The example XML document, BookCatalog.xml, used by most of the StAX example classes, is a simple book catalog based on the common BookCatalogue namespace. The contents of BookCatalog.xml are listed below:

<?xml version="1.0" encoding="UTF-8"?>
<BookCatalogue xmlns="">
        <Title>Yogasana Vijnana: the Science of Yoga</Title>
        <author>Dhirendra Brahmachari</Author>
        <Publisher>Dhirendra Yoga Publications</Publisher>
        <Cost currency="INR">11.50</Cost>
        <Title>The First and Last Freedom</Title>
        <Author>J. Krishnamurti</Author>
        <Publisher>Harper &amp; Row</Publisher>
        <Cost currency="USD">2.95</Cost>