Processing XML

XML Foundations (INFO 242)

Erik Wilde, UC Berkeley School of Information
2007-09-06
Creative Commons License

This work is licensed under a CC
Attribution 3.0 Unported License

Abstract

XML is a format for structured data, but it does not prescribe any way of processing these structures. In practice, XML data has to processed by using XML-specific support in some programming environment. In this lecture, the most popular ways of processing XML data are discussed; the Document Object Model (DOM) as a tree-based data model, the Simple API for XML (SAX) as an event-based programming model, and XSL Transformations (XSLT) as a dedicated programming language for transforming XML.

Outline (Processing XML)

  1. Processing XML [3]
  2. Simple API for XML (SAX) [2]
  3. Document Object Model (DOM) [3]
  4. XML Data Binding [1]
  5. XSL Transformations (XSLT) [1]
  6. Conclusions [2]

XML and Programming

XML and Programming Languages

Typical XML & Programming Problem

Outline (Simple API for XML (SAX))

  1. Processing XML [3]
  2. Simple API for XML (SAX) [2]
  3. Document Object Model (DOM) [3]
  4. XML Data Binding [1]
  5. XSL Transformations (XSLT) [1]
  6. Conclusions [2]

Lightweight XML Processing

SAX Parser

SAX Parser

Outline (Document Object Model (DOM))

  1. Processing XML [3]
  2. Simple API for XML (SAX) [2]
  3. Document Object Model (DOM) [3]
  4. XML Data Binding [1]
  5. XSL Transformations (XSLT) [1]
  6. Conclusions [2]

XML Trees Everywhere

DOM Parser

DOM Parser

JDOM

Outline (XML Data Binding)

  1. Processing XML [3]
  2. Simple API for XML (SAX) [2]
  3. Document Object Model (DOM) [3]
  4. XML Data Binding [1]
  5. XSL Transformations (XSLT) [1]
  6. Conclusions [2]

Mapping XML into Languages

Outline (XSL Transformations (XSLT))

  1. Processing XML [3]
  2. Simple API for XML (SAX) [2]
  3. Document Object Model (DOM) [3]
  4. XML Data Binding [1]
  5. XSL Transformations (XSLT) [1]
  6. Conclusions [2]

An XML Programming Language

Outline (Conclusions)

  1. Processing XML [3]
  2. Simple API for XML (SAX) [2]
  3. Document Object Model (DOM) [3]
  4. XML Data Binding [1]
  5. XSL Transformations (XSLT) [1]
  6. Conclusions [2]

Document Engineering

Assignment 2