EBoard 29: Processing XML

Approximate overview

  • Admin
  • Lab

Administrative stuff

Introductory notes

  • I hope you are reveling in the extra sleep.
  • Today’s lab require a variety of packages. (File -> Install Package …)
    • html-parsing
    • html-writing
    • sxml
    • https://github.com/grinnell-cs/csc151www.git#main
  • Today is yet another new(-ish) lab. Fingers crossed.
    • Friday will be, too. Toes crossed?

Upcoming activities

Token Events

  • Learning from CS Alumni Tuesday at 2pm in 3821: Marli Remash ‘20
  • Mentor session Tuesday at 8pm
  • CS Extras Thursday at 4pm in 3821: Molecular programming!
  • Writers@Grinnell Thursday at 8pm in Bucksbaum 131
  • Football vs Cornell College Saturday at noon
  • GSO Saturday at 2pm in Sebring-Lewis
  • Grinnell Singers Sunday at 2pm in Sebring-Lewis

Other good things

  • Thursday, 11am, Math Talk, in a Math classroom
  • Women’s Basketball vs Central, 7pm Tonight
  • Men’s Basketball vs Spurgeon (?), 7pm Wednesday

Upcoming work

  • SoLA 3 due Thursday.
    • We’ll discuss sample problems on Wednesday.
  • Reading for Friday not yet available. (Schedule is likely to change.)

Q&A

Lab

Preliminaries

  • Make sure to install the new packages.
  • You have two files to download (.rkt and .html).
  • Don’t forget the normal start-of-lab stuff.

Notes during lab

  • If you don’t understand the results for 1c, read the introduction to 1d.
  • ul is “unnumbered list” (maybe “unordered list”)
  • li is “list item”
  • q is quotation. So I expect something like (li "Eamon is an " (q "ultimate") " player")
  • Looking for quotations (define rex-q (rex-any-of (rex-string "<q>") (rex-string "<Q>") (rex-string "<q ") (rex-string "<Q ")))
  • Looking for emphasis (define rex-em (rex-concat (rex-string "<") (rex-any-of (rex-string "em") (rex-string "EM")) (rex-char-set " >")))
  • Looking for emphasis in quotations, Eamon style (define rex-q-em (rex-concat rex-q (rex-repeat0 (rex-any-char)) rex-em))
  • A problem: This also matches “Hello World
  • It is not possible to write rex-q-em! Regular expressions have limited power.

Notes post lab

Should Sam rewrite the reading?

How was the lab?