Last 4 Digits of Your Peoplesoft ID ________________
<XML id="polls">
<?xml version="1.0"?>
<!DOCTYPE football_rankings [ <!ELEMENT football_rankings(polldate,poll+)> <!ELEMENT polldate (#PCDATA)> <!ELEMENT poll (pollname,team+)> <!ELEMENT pollname (#PCDATA)> <!ELEMENT team (#PCDATA)> ]> <football_rankings> <polldate>November 28, 2011</polldate> <poll> <pollname>BCS</pollname> <team>LSU</team> <team>Alabama</team> <team>Oklahoma State</team> <team>Stanford</team> <team>Virginia Tech</team> <team>Houston</team> <team>Boise State</team> ...many rows omitted... <team>West Virginia</team> <team>Southern Miss</team> <team>Missouri</team> </poll><poll> <pollname>AP</pollname> <team>LSU</team> <team>Alabama</team> <team>Oklahoma State</team> <team>Stanford</team> <team>Virginia Tech</team> <team>Arkansas</team> <team>Houston</team> <team>Oregon</team> ...many rows omitted... <team>Iowa State</team> <team>Notre Dame</team> </poll></football_rankings> </XML> |
1. (50 points) Several NCA football polls rank the University of
Houston in the top ten for the week of November 28, 2011. Five if these polls (BCS, AP, USA Today, CBS and
TeamRankings.com have polls that show the top 25 teams. An XML file containing this data is stored inside
an XML tag with id="polls". A portion of the xml is shown to the left.
When the user clicks this button: , a javascript function named p1 is executed. This function retrieves the XML and creates a 6 column table showing all the rankings as follows:
Show only the javascript for p1. Show NO HTML. Notes:
|