Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <style>
  7. #header{
  8.  
  9. text-align:center;
  10.  
  11. }
  12.  
  13. #middle{
  14.  
  15. text-align:center;
  16.  
  17. }
  18.  
  19. </style>
  20. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  21. <script type="text/javascript">
  22. //function getList () {
  23. $(document).ready(function() {
  24. //$("p").click(function() {
  25. var xhr = new XMLHttpRequest();
  26. xhr.onreadystatechange = function() {
  27. if (xhr.readyState == 4 && xhr.status == 200) {
  28. xmlDoc = xhr.responseXML;
  29. var team =
  30. xmlDoc.getElementsByTagName("fixtures");
  31. var html = "";
  32. for (i = 0; i < team.length; i++) {
  33. html +=
  34. // xmlDoc.getElementsByTagName("image1")[i].childNodes[0].nodeValue + "<br>" +
  35. xmlDoc.getElementsByTagName("match")[i].childNodes[0].nodeValue + "<br>" +
  36. xmlDoc.getElementsByTagName("image2")[i].childNodes[0].nodeValue + "<br>" +//
  37. xmlDoc.getElementsByTagName("location")[i] .childNodes[0].nodeValue + "<br>" +
  38. xmlDoc.getElementsByTagName("date")[i] .childNodes[0].nodeValue + "<br><br>";
  39. }
  40. document.getElementById("matchlist").innerHTML = html;
  41.  
  42. }
  43. }
  44. xhr.open("GET", "fixtures.xml", true);
  45. xhr.send();
  46.  
  47. });
  48. </script>
  49.  
  50. </head>
  51. <body>
  52. <div id = "header"><h1>UEFA European Championship 2016 Final Tournament - Group Stage</h1></div>
  53. <div id = "middle" >
  54.  
  55. <ul id="matchlist" ></ul>
  56. </div>
  57. </body>
  58. </html>
  59.  
  60. <?xml version="1.0" encoding="iso-8859-1"?>
  61. <?xml-stylesheet type="text/xsl" href="xpsport2.xsl"?>
  62. <Fixtures>
  63. <fixtures field="Football">
  64. <image1 src="http://img.uefa.com/imgml/flags/50x50/BEL.png" alt="Belgium"></image1>
  65. <image2 src="http://img.uefa.com/imgml/flags/50x50/IRL.png" alt="Republic of Ireland"></image2>
  66. <match>Belgium v Rep. of Ireland</match>
  67. <location>Stade Bollaert-Delelis, Lens</location>
  68. <date>Saturday, June 11</date>
  69. </fixtures>
  70. <fixtures field="Football">
  71. <image1 src="imagesireland.jpg" ></image1>
  72. <image2 src="imagessweden.jpg"></image2>
  73. <match>Rep. of Ireland v Sweden</match>
  74. <location>Stade de France, Paris</location>
  75. <date> Monday.13 june 2016</date>
  76. </fixtures>
  77. <fixtures field="Football">
  78. <image1 src="imagesbelgium.jpg" />
  79. <image2 src="imagessweden.jpg"/>
  80. <match> Sweden v Belgium</match>
  81. <location>Stade Pierre Mauroy, Lille</location>
  82. <date>Tuesday, June 14 </date>
  83. </fixtures>
  84.  
  85. <fixtures field="Football">
  86. <image1 src="imagesitaly.jpg"/>
  87. <image2 src="imagessweden.jpg"/>
  88. <match>Italy v Sweden</match>
  89. <location>Stade de Bordeaux,Bordeaux</location>
  90. <date> Monday,18 June </date>
  91. </fixtures>
  92. <fixtures field="Football">
  93. <image1 src="imagesitaly.jpg" />
  94. <image2 src="imagesireland.jpg"/>
  95. <match>Italy v Rep. of Ireland</match>
  96. <location>Grand Stade Lille Métropole, Lille</location>
  97. <date>Friday, 22 June </date>
  98. </fixtures>
  99. </Fixtures>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement