House points software - roll your ownwith PHP
I have managed to create a report in SIMS and I have got commandreporter running the report and dumping the data into an xml file. Could anyone point me in the right direction, how I would go about extracting the data into a webpage?
Many thanks
I would personally do it in PHP - Use a function called simplexml_load_file
Here is an example of how I use it to produce timetables on our intranet page:
$xml = simplexml_load_file("upload/timetablesoutput.xml"); foreach ($xml->Record as $item){ $name = explode(" ", $item->Student); $subject = strtoupper($item->Subject); $teacher = $item->Staff_x0020_Code; $date = explode("T", $item->DOB); if($subject == "") {}else{ $sql = mysql_query("INSERT INTO `timetable` (`name`, `dob`, `form`, `subject`, `period`, `staff`, `room`) VALUES ('$name[0] $name[1]', '$date[0]', '$name[3]', '$subject', '$item->Period', '$teacher', '$item->Room');"); } }
So it runs through the file, gets the elements and then inserts them into a Database for me, but you would need to get it to display live data, so instead of using mysql_query, use echo and just print it to the page.
EDIT: What is EduGeek doing to my code, its word wrapping it...

0 Comments
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now