Processing XML

XML Foundations [./]
Fall 2011 — INFO 242 (CCN 42596)

Ray Larson, UC Berkeley School of Information
2011-09-15

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 R. Larson: Processing XML

Contents

R. Larson: 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 R. Larson: Processing XML

(4) XML and Programming



Processing XML R. Larson: Processing XML

(5) XML and Programming Languages



Processing XML R. Larson: 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) R. Larson: Processing XML

(8) Lightweight XML Processing



Simple API for XML (SAX) R. Larson: 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) R. Larson: Processing XML

(11) XML Trees Everywhere



Document Object Model (DOM) R. Larson: Processing XML

(12) DOM Parser

DOM Parser

Document Object Model (DOM) R. Larson: 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 R. Larson: 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) R. Larson: 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 R. Larson: Processing XML

(19) Document Engineering



2011-09-15 XML Foundations [./]
Fall 2011 — INFO 242 (CCN 42596)