-- crns of all sections
select ExtractValue(xmldoc,'/COLLEGE/SECTION/@crn') from xml where docid=1;

-- crns of all sections of CS 341
select ExtractValue(xmldoc,'/COLLEGE/SECTION[DEPT="CS"][CRSNUM="341"]/@crn') from xml where docid=1;

-- name of student with ssn 999-99-0003
select ExtractValue(xmldoc,'/COLLEGE/STUDENT[@ssn="999-99-0003"]/NAME') from xml where docid=1;

-- crns of all sections
select ExtractValue(xmldoc,'/COLLEGE/SECTION/@crn') from xml where docid=2;

-- crns of all sections of CS 341
select ExtractValue(xmldoc,'/COLLEGE/COURSE[DEPT="CS"][CRSNUM="341"]/SECTION/@crn') from xml where docid=2;

-- name of student with ssn 999-99-0003
select ExtractValue(xmldoc,'/COLLEGE/STUDENT[@ssn="999-99-0003"]/NAME') from xml where docid=2;
