XQuery to clean up data from an Excel-generated webpage & generate an EAD document
✓ Published0🌍 Public
CCliffordAnderson
Last edited Jun 12, 2015
Created on Jun 1, 2015
This example shows how XQuery 3.1 can clean data scraped from an Excel-generated HTML table and use it to generate an EAD (Encoded Archival Description) finding aid. The `fetch:text()` and `html:parse` functions extract rows from a legacy webpage, normalize the text content, and repackage the fields into JSON maps. A second function transforms those entries into EAD `<c02>` components, inserting metadata like titles, abstracts, and thumbnail image links from the Lantern Slide collection at Vanderbilt. Finally, the script rebuilds a complete EAD document, injecting the new `<c02>` elements into the existing archival description hierarchy, preserving the original structure while enriching it with parsed data.
AI-generated description