Processing XML

XML Foundations [./]
Fall 2009 — INFO 242 (CCN 42575)

Erik Wilde, UC Berkeley School of Information
2009-09-03

Creative Commons License [http://creativecommons.org/licenses/by/3.0/]

This work is licensed under a CC
Attribution 3.0 Unported License
[http://creativecommons.org/licenses/by/3.0/]

Contents E. Wilde: Processing XML

Contents

E. Wilde: Processing XML

(2) 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.



Processing 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 [1]
Processing XML E. Wilde: Processing XML

(4) XML and Programming



Processing XML E. Wilde: Processing XML

(5) XML and Programming Languages



Processing XML E. Wilde: Processing XML

(6) Typical XML & Programming Problem



Simple API for XML (SAX)

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 [1]
Simple API for XML (SAX) E. Wilde: Processing XML

(8) Lightweight XML Processing



Simple API for XML (SAX) E. Wilde: Processing XML

(9) SAX Parser

SAX Parser

Document Object Model (DOM)

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 [1]
Document Object Model (DOM) E. Wilde: Processing XML

(11) XML Trees Everywhere



Document Object Model (DOM) E. Wilde: Processing XML

(12) DOM Parser

DOM Parser

Document Object Model (DOM) E. Wilde: Processing XML

(13) JDOM



XML Data Binding

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 [1]
XML Data Binding E. Wilde: Processing XML

(15) Mapping XML into Languages



XSL Transformations (XSLT)

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 [1]
XSL Transformations (XSLT) E. Wilde: Processing XML

(17) An XML Programming Language



Conclusions

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 [1]
Conclusions E. Wilde: Processing XML

(19) Document Engineering



2009-09-03 XML Foundations [./]
Fall 2009 — INFO 242 (CCN 42575)