XML, AJAX, Web Services




CS174

Chris Pollett

May 3, 2021

Outline

Introduction to XML

The Syntax of XML

XML Document Structure and Entities

Document Type Definitions

<!ELEMENT ..>

<!ATTLIST ..>

<!ENTITY ..>

Example DTD

<?xml version = "1.0" encoding ="utf-8" ?>
<!-- planes_for_sale.dtd  -->
<!ELEMENT planes_for_sale (ad+) >
<!ELEMENT ad (year, make, model, color, price?, seller) >
<!ELEMENT year (#PCDATA)>
<!ELEMENT make (#PCDATA)>
<!ELEMENT model (#PCDATA)>
<!ELEMENT color (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT seller (#PCDATA)>
<!ATTLIST seller license CDATA #REQUIRED >
<!ENTITY c "cessna" >

Internal versus External DTDs

Namespaces

XML and CSS

Beginning AJAX

Step-by-Step I

Step-by-Step II

Step-by-Step Continued III

Step-by-Step Continued IV

Parsing What Comes Back

Quiz

Which of the following statements is true?

  1. setInterval is used to set up a non-repeating timer in Javascript.
  2. private visibility can be faked in Javascript using the module pattern.
  3. The regex pattern /\d/ matches any single non-digit character.

Web Services

REST

JSON