<< Page Travaux

Extracting data from an XML document using PHP and SimpleXML

Conceptual goals

For this exercise I modified an existing XML file containing data on lessons within online course content for ALPECOLe (a SVC project at the University of Zürich for which I am working). The course includes mandatory and optional content. I wished to create an easy reference table that would allow project participants and authors to have a quick overview of each lesson's parts. PHP and SimpleXML were used to extract the desired data.

Documents

report, extract_table.php (source), details.php (source) extract_table_all.php (source), lessons.xml, css

 

February 13 , 2006 k.b.

valid XHTML, valid CSS