Example Source Code from Chapter 4, Converting Flat Files to XML, of Processing XML with Java
Example 4-1 A class that parses comma separated values into a List of HashMaps
Example 4-2 Naively reproducing the original table structure in XML
Example 4-3 A schema for the XML budget data
Example 4-4 Converting to XML with attributes
Example 4-5 A hierarchical arrangement of the budget data
Example 4-6 The Budget class
Example 4-7 The Agency class
Example 4-8 The Bureau Class
Example 4-9 An Account Class
Example 4-10 The Subfunction Class
Example 4-11 The driver class that builds the data structure and writes it out again
Example 4-12 An XSLT stylesheet that converts flat XML data to hierarchical XML data
Example 4-13 An XQuery that converts flat data to hierarchical data
Example 4-14 A program that connects to a relational database using JDBC and converts the table to hierarchical XML
Examples from Other Chapters
|
Processing XML with Java
|
Cafe con Leche
Copyright 2002 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified November 23, 2002