dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Insert XML into a HTML Styled Timetable

  1. #1
    Join Date
    Jun 2014
    Posts
    1

    Insert XML into a HTML Styled Timetable

    I'm very new to XML and using it within HTML Basically I am creating a Timetable for a school and the table is created first by defining some table headers e.g and then defining the rows for a given student.

    to make things more clearer here is some of my source code: the first being for the tables headers

    <tr>
    <th>Student</th>
    <th>9</th>
    <th>10</th>
    <th>11</th>
    <th>12</th>
    <th>1</th>
    <th>2</th>
    <th>3</th>
    <th>4</th>
    <th>5</th>
    </tr>

    next the rows for a student

    <tr>
    <th>David</td>
    <td>TBA</td>
    <td>TBA</td>
    <td>TBA</td>
    <td>TBA</td>
    <td>TBA</td>
    <td>TBA</td>
    <td>TBA</td>
    </div>
    </tr>

    my xml data file looks mainly like so:
    <student id="55">
    <David>
    <Lesson>English</Lesson>
    <Start>9.00</Start>
    <End>10</End>
    </David>

    Generally I just wondered what is the best possible way to implement the XML into the time table ? specifically as I'm very new to using XML so any info/source code for this problem would be greatly appreciated or if anyone is able to have a look at my source. specifically a student should be able to see when their lesson starts and ends. I have looked at several examples though seem to hit a brick wall so to speak when trying to implement into my HTML.

  2. #2
    Join Date
    Mar 2012
    Posts
    1,814
    What you are asking for cannot be done in HTML alone. Ideally you need to build a database back-end to hold the data, and an HTML front-end to input enquiries and present the results. You can link the front and back ends with PHP. Alternatively, if the amount of data is small, use PHP arrays to hold and manipulate the data, without a database back-end.

    That, or find a CMS designed to manipulate the type of data you have.

  3. #3
    Join Date
    Mar 2011
    Posts
    1,156
    Or, if your XML data files are well-formed, you can use one of the several ways of using PHP to parse and process them into your HTML pages directly as desired.

    Search on "PHP XML parser" and you'll find some good information.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles