Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <style>
- #header{
- text-align:center;
- }
- #middle{
- text-align:center;
- }
- </style>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
- <script type="text/javascript">
- //function getList () {
- $(document).ready(function() {
- //$("p").click(function() {
- var xhr = new XMLHttpRequest();
- xhr.onreadystatechange = function() {
- if (xhr.readyState == 4 && xhr.status == 200) {
- xmlDoc = xhr.responseXML;
- var team =
- xmlDoc.getElementsByTagName("fixtures");
- var html = "";
- for (i = 0; i < team.length; i++) {
- html +=
- // xmlDoc.getElementsByTagName("image1")[i].childNodes[0].nodeValue + "<br>" +
- xmlDoc.getElementsByTagName("match")[i].childNodes[0].nodeValue + "<br>" +
- xmlDoc.getElementsByTagName("image2")[i].childNodes[0].nodeValue + "<br>" +//
- xmlDoc.getElementsByTagName("location")[i] .childNodes[0].nodeValue + "<br>" +
- xmlDoc.getElementsByTagName("date")[i] .childNodes[0].nodeValue + "<br><br>";
- }
- document.getElementById("matchlist").innerHTML = html;
- }
- }
- xhr.open("GET", "fixtures.xml", true);
- xhr.send();
- });
- </script>
- </head>
- <body>
- <div id = "header"><h1>UEFA European Championship 2016 Final Tournament - Group Stage</h1></div>
- <div id = "middle" >
- <ul id="matchlist" ></ul>
- </div>
- </body>
- </html>
- <?xml version="1.0" encoding="iso-8859-1"?>
- <?xml-stylesheet type="text/xsl" href="xpsport2.xsl"?>
- <Fixtures>
- <fixtures field="Football">
- <image1 src="http://img.uefa.com/imgml/flags/50x50/BEL.png" alt="Belgium"></image1>
- <image2 src="http://img.uefa.com/imgml/flags/50x50/IRL.png" alt="Republic of Ireland"></image2>
- <match>Belgium v Rep. of Ireland</match>
- <location>Stade Bollaert-Delelis, Lens</location>
- <date>Saturday, June 11</date>
- </fixtures>
- <fixtures field="Football">
- <image1 src="imagesireland.jpg" ></image1>
- <image2 src="imagessweden.jpg"></image2>
- <match>Rep. of Ireland v Sweden</match>
- <location>Stade de France, Paris</location>
- <date> Monday.13 june 2016</date>
- </fixtures>
- <fixtures field="Football">
- <image1 src="imagesbelgium.jpg" />
- <image2 src="imagessweden.jpg"/>
- <match> Sweden v Belgium</match>
- <location>Stade Pierre Mauroy, Lille</location>
- <date>Tuesday, June 14 </date>
- </fixtures>
- <fixtures field="Football">
- <image1 src="imagesitaly.jpg"/>
- <image2 src="imagessweden.jpg"/>
- <match>Italy v Sweden</match>
- <location>Stade de Bordeaux,Bordeaux</location>
- <date> Monday,18 June </date>
- </fixtures>
- <fixtures field="Football">
- <image1 src="imagesitaly.jpg" />
- <image2 src="imagesireland.jpg"/>
- <match>Italy v Rep. of Ireland</match>
- <location>Grand Stade Lille Métropole, Lille</location>
- <date>Friday, 22 June </date>
- </fixtures>
- </Fixtures>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement