File: newXmlDataTest.php

Recommend this page to a friend!
  Classes of Mostafa Abd-El-Hamid  >  XML Movies Iterator  >  newXmlDataTest.php  >  Download  
File: newXmlDataTest.php
Role: Auxiliary script
Content type: text/plain
Description: XML Data to Test
Class: XML Movies Iterator
Extract movies from XML file
Author: By
Last change: Edited the Code
Date: 6 years ago
Size: 18,489 bytes
 

 

Contents

Class file image Download
<?php
$xmlstr = <<<XML
		<?xml version='1.0' standalone='yes'?>
		<movies>

		 <movie>
		  <title>PHP: Behind the Parser</title>
		  
		  <characters>
			<smoking>
				<status>Non-Smoker</status>
			</smoking>
			<seat>
				<statu>VIP</statu>
			</seat>
			<seat>
				<statu>Economy</statu>
			</seat>
			<smoking>
				<status>Smoker</status>
			</smoking>
			<room>
				<stat>Double</stat>
			</room>
			<roomluxury>
				<sta>Luxurious</sta>
			</roomluxury>
			<roomluxury>
				<sta>Standard</sta>
			</roomluxury>
			<roomluxury>
				<sta>Simple</sta>
			</roomluxury>
			<room>
				<stat>Single</stat>
			</room>
			<adultsroom>
				<number>1</number>
			</adultsroom>
			<adultstransportation>
				<numbertrans>1</numbertrans>
			</adultstransportation>
			<adultsroom>
				<number>2</number>
			</adultsroom>
			<adultstransportation>
				<numbertrans>2</numbertrans>
			</adultstransportation>
			<adultsroom>
				<number>3</number>
			</adultsroom>
			<adultstransportation>
				<numbertrans>3</numbertrans>
			</adultstransportation>
			<adultsroom>
				<number>4</number>
			</adultsroom>
			<adultstransportation>
				<numbertrans>4</numbertrans>
			</adultstransportation>
			<adultsroom>
				<number>5</number>
			</adultsroom>
			<adultsroom>
				<number>6</number>
			</adultsroom>
			<adultsroom>
				<number>7</number>
			</adultsroom>
			<adultsroom>
				<number>8</number>
			</adultsroom>
			<date>
				<month>January</month>
			</date>
			<date2>
				<year>2014</year>
			</date2>
			<date3>
				<day>01</day>
			</date3>
			<date>
				<month>February</month>
			</date>
			<date2>
				<year>2015</year>
			</date2>
			<date3>
				<day>02</day>
			</date3>
			<date>
				<month>March</month>
			</date>
			<date2>
				<year>2016</year>
			</date2>
			<date3>
				<day>03</day>
			</date3>
			<date>
				<month>April</month>
			</date>
			<date2>
				<year>2017</year>
			</date2>
			<date3>
				<day>04</day>
			</date3>
			<date>
				<month>May</month>
			</date>
			<date2>
				<year>2018</year>
			</date2>
			<date3>
				<day>05</day>
			</date3>
			<date>
				<month>June</month>
			</date>
			<date2>
				<year>2019</year>
			</date2>
			<date3>
				<day>06</day>
			</date3>
			<date>
				<month>July</month>
			</date>
			<date2>
				<year>2020</year>
			</date2>
			<date3>
				<day>07</day>
			</date3>
			<date>
				<month>August</month>
			</date>
			<date2>
				<year>2021</year>
			</date2>
			<date3>
				<day>08</day>
			</date3>
			<date>
				<month>September</month>
			</date>
			<date2>
				<year>2022</year>
			</date2>
			<date3>
				<day>09</day>
			</date3>
			<date>
				<month>October</month>
			</date>
			<date2>
				<year>2023</year>
			</date2>
			<date3>
				<day>10</day>
			</date3>
			<date>
				<month>Nobember</month>
			</date>
			<date2>
				<year>2024</year>
			</date2>
			<date3>
				<day>11</day>
			</date3>
			<date>
				<month>December</month>
			</date>
			<date2>
				<year>2025</year>
			</date2>
			<date3>
				<day>12</day>
			</date3>
			<date3>
				<day>13</day>
			</date3>
			<date3>
				<day>14</day>
			</date3>
			<date3>
				<day>15</day>
			</date3>
			<date3>
				<day>16</day>
			</date3>
			<date3>
				<day>17</day>
			</date3>
			<date3>
				<day>18</day>
			</date3>
			<date3>
				<day>19</day>
			</date3>
			<date3>
				<day>20</day>
			</date3>
			<date3>
				<day>21</day>
			</date3>
			<date3>
				<day>22</day>
			</date3>
			<date3>
				<day>23</day>
			</date3>
			<date3>
				<day>24</day>
			</date3>
			<date3>
				<day>25</day>
			</date3>
			<date3>
				<day>26</day>
			</date3>
			<date3>
				<day>27</day>
			</date3>
			<date3>
				<day>28</day>
			</date3>
			<date3>
				<day>29</day>
			</date3>
			<date3>
				<day>30</day>
			</date3>
			<date3>
				<day>31</day>
			</date3>
			<state>
				<abbr>AL</abbr>
			</state>
			<state>
				<abbr>AK</abbr>
			</state>
			<state>
				<abbr>AZ</abbr>
			</state>
			<state>
				<abbr>AR</abbr>
			</state>
			<state>
				<abbr>CA</abbr>
			</state>
			<state>
				<abbr>CO</abbr>
			</state>
			<state>
				<abbr>CT</abbr>
			</state>
			<state>
				<abbr>DE</abbr>
			</state>
			<state>
				<abbr>FL</abbr>
			</state>
			<state>
				<abbr>GA</abbr>
			</state>
			<state>
				<abbr>HI</abbr>
			</state>
			<state>
				<abbr>ID</abbr>
			</state>
			<state>
				<abbr>IL</abbr>
			</state>
			<state>
				<abbr>IL</abbr>
			</state>
			<state>
				<abbr>IA</abbr>
			</state>
			<state>
				<abbr>KS</abbr>
			</state>
			<state>
				<abbr>KY</abbr>
			</state>
			<state>
				<abbr>LA</abbr>
			</state>
			<state>
				<abbr>ME</abbr>
			</state>
			<state>
				<abbr>MD</abbr>
			</state>
			<state>
				<abbr>MA</abbr>
			</state>
			<state>
				<abbr>MI</abbr>
			</state>
			<state>
				<abbr>MN</abbr>
			</state>
			<state>
				<abbr>MS</abbr>
			</state>
			<state>
				<abbr>MO</abbr>
			</state>
			<state>
				<abbr>MT</abbr>
			</state>
			<state>
				<abbr>NE</abbr>
			</state>
			<state>
				<abbr>NV</abbr>
			</state>
			<state>
				<abbr>NH</abbr>
			</state>
			<state>
				<abbr>NJ</abbr>
			</state>
			<state>
				<abbr>NM</abbr>
			</state>
			<state>
				<abbr>NY</abbr>
			</state>
			<state>
				<abbr>NC</abbr>
			</state>
			<state>
				<abbr>ND</abbr>
			</state>
			<state>
				<abbr>OH</abbr>
			</state>
			<state>
				<abbr>OK</abbr>
			</state>
			<state>
				<abbr>OR</abbr>
			</state>
			<state>
				<abbr>PA</abbr>
			</state>
			<state>
				<abbr>RI</abbr>
			</state>
			<state>
				<abbr>SC</abbr>
			</state>
			<state>
				<abbr>SD</abbr>
			</state>
			<state>
				<abbr>TN</abbr>
			</state>
			<state>
				<abbr>TX</abbr>
			</state>
			<state>
				<abbr>UT</abbr>
			</state>
			<state>
				<abbr>VT</abbr>
			</state>
			<state>
				<abbr>VA</abbr>
			</state>
			<state>
				<abbr>WA</abbr>
			</state>
			<state>
				<abbr>WV</abbr>
			</state>
			<state>
				<abbr>WI</abbr>
			</state>
			<state>
				<abbr>WY</abbr>
			</state>
			<state>
				<abbr>DC</abbr>
			</state>
			<state>
				<abbr>Outside of United States</abbr>
			</state>
		   <character>
		    <name>Algeria</name>
		   </character>
		   <character>
			<name>Afghanistan</name>
		   </character>
			<character>
			    <name>Albania</name>
			</character>
			<character>
			    <name>Angola</name>
			</character>
			<character>
			    <name>Argentina</name>
			</character>
			<character>
			    <name>Armenia</name>
			</character>
			<character>
			    <name>Aruba</name>
			</character>
			<character>
			    <name>Australia</name>
			</character>
			<character>
			    <name>Austria</name>
			</character>
			<character>
			    <name>Azerbaijan</name>
			</character>
			<character>
			    <name>Bahamas</name>
			</character>
			<character>
			    <name>Bahrain</name>
			</character>
			<character>
			    <name>Bangladesh</name>
			</character>
			<character>
			    <name>Barbados</name>
			</character>
			<character>
			    <name>Belarus</name>
			</character>
			<character>
			    <name>Belgium</name>
			</character>
			<character>
			    <name>Belize</name>
			</character>
			<character>
			    <name>Benin</name>
			</character>
			<character>
			    <name>Bhutan</name>
			</character>
			<character>
			    <name>Bolivia</name>
			</character>
			<character>
			    <name>Bosnia and Herzegovina</name>
			</character>
			<character>
			    <name>Botswana</name>
			</character>
			<character>
			    <name>Brazil</name>
			</character>
			<character>
			    <name>Brunei</name>
			</character>
			<character>
			    <name>Bulgaria</name>
			</character>
			<character>
			    <name>Burkina Faso</name>
			</character>
			<character>
			    <name>Burundi</name>
			</character>
			<character>
			    <name>Cambodia</name>
			</character>
			<character>
			    <name>Cameroon</name>
			</character>
			<character>
			    <name>Canada</name>
			</character>
			<character>
			    <name>Cape Verde</name>
			</character>
			<character>
			    <name>Central African Republic</name>
			</character>
			<character>
			    <name>Chad</name>
			</character>
			<character>
			    <name>Chile</name>
			</character>
			<character>
			    <name>China</name>
			</character>
			<character>
			    <name>Hong Kong</name>
			</character>
			<character>
			    <name>Macao</name>
			</character>
			<character>
			    <name>Colombia</name>
			</character>
			<character>
			    <name>Comoros</name>
			</character>
			<character>
			    <name>Congo</name>
			</character>
			<character>
			    <name>Costa Rica</name>
			</character>
			<character>
			    <name>Cote d Ivoire</name>
			</character>
			<character>
			    <name>Croatia</name>
			</character>
			<character>
			    <name>Cuba</name>
			</character>
			<character>
			    <name>Cyprus</name>
			</character>
			<character>
			    <name>Czech Republic</name>
			</character>
			<character>
			    <name>South Korea</name>
			</character>
			<character>
			    <name>North Korea</name>
			</character>
			<character>
			    <name>Congo</name>
			</character>
			<character>
			    <name>Denmark</name>
			</character>
			<character>
			    <name>Djibouti</name>
			</character>
			<character>
			    <name>Dominican Republic</name>
			</character>
			<character>
			    <name>Ecuador</name>
			</character>
			<character>
			    <name>Egypt</name>
			</character>
			<character>
			    <name>El Salvador</name>
			</character>
			<character>
			    <name>Equatorial Guinea</name>
			</character>
			<character>
			    <name>Eritrea</name>
			</character>
			<character>
			    <name>Estonia</name>
			</character>
			<character>
			    <name>Ethiopia</name>
			</character>
			<character>
			    <name>Fiji</name>
			</character>
			<character>
			    <name>Finland</name>
			</character>
			<character>
			    <name>France</name>
			</character>
			<character>
			    <name>French Polynesia</name>
			</character>
			<character>
			    <name>Gabon</name>
			</character>
			<character>
			    <name>Gambia</name>
			</character>
			<character>
			    <name>Georgia</name>
			</character>
			<character>
			    <name>Germany</name>
			</character>
			<character>
			    <name>Ghana</name>
			</character>
			<character>
			    <name>Greece</name>
			</character>
			<character>
			    <name>Grenada</name>
			</character>
			<character>
			    <name>Guam</name>
			</character>
			<character>
			    <name>Guatemala</name>
			</character>
			<character>
			    <name>Guinea</name>
			</character>
			<character>
			    <name>Guinea-Bissau</name>
			</character>
			<character>
			    <name>Guyana</name>
			</character>
			<character>
			    <name>Haiti</name>
			</character>
			<character>
			    <name>Honduras</name>
			</character>
			<character>
			    <name>Hungary</name>
			</character>
			<character>
			    <name>Iceland</name>
			</character>
			<character>
			    <name>India</name>
			</character>
			<character>
			    <name>Indonesia</name>
			</character>
			<character>
			    <name>Iran</name>
			</character>
			<character>
			    <name>Iraq</name>
			</character>
			<character>
			    <name>Ireland</name>
			</character>
			<character>
			    <name>Israel</name>
			</character>
			<character>
			    <name>Italy</name>
			</character>
			<character>
			    <name>Jamaica</name>
			</character>
			<character>
			    <name>Japan</name>
			</character>
			<character>
			    <name>Jordan</name>
			</character>
			<character>
			    <name>Kazakhstan</name>
			</character>
			<character>
			    <name>Kenya</name>
			</character>
			<character>
			    <name>Kuwait</name>
			</character>
			<character>
			    <name>Kyrgyzstan</name>
			</character>
			<character>
			    <name>Laos</name>
			</character>
			<character>
			    <name>Latvia</name>
			</character>
			<character>
			    <name>Lebanon</name>
			</character>
			<character>
			    <name>Lesotho</name>
			</character>
			<character>
			    <name>Liberia</name>
			</character>
			<character>
			    <name>Libya</name>
			</character>
			<character>
			    <name>Lithuania</name>
			</character>
			<character>
			    <name>Luxembourg</name>
			</character>
			<character>
			    <name>Madagascar</name>
			</character>
			<character>
			    <name>Malawi</name>
			</character>
			<character>
			    <name>Malaysia</name>
			</character>
			<character>
			    <name>Maldives</name>
			</character>
			<character>
			    <name>Mali</name>
			</character>
			<character>
			    <name>Malta</name>
			</character>
			<character>
			    <name>Martinique</name>
			</character>
			<character>
			    <name>Mauritania</name>
			</character>
			<character>
			    <name>Mauritius</name>
			</character>
			<character>
			    <name>Mexico</name>
			</character>
			<character>
			    <name>Micronesia</name>
			</character>
			<character>
			    <name>Mongolia</name>
			</character>
			<character>
			    <name>Montenegro</name>
			</character>
			<character>
			    <name>Morocco</name>
			</character>
			<character>
			    <name>Mozambique</name>
			</character>
			<character>
			    <name>Myanmar</name>
			</character>
			<character>
			    <name>Namibia</name>
			</character>
			<character>
			    <name>Nepal</name>
			</character>
			<character>
			    <name>Netherlands</name>
			</character>
			<character>
			    <name>Netherlands Antilles</name>
			</character>
			<character>
			    <name>New Zealand</name>
			</character>
			<character>
			    <name>Nicaragua</name>
			</character>
			<character>
			    <name>Niger</name>
			</character>
			<character>
			    <name>Nigeria</name>
			</character>
			<character>
			    <name>Norway</name>
			</character>
			<character>
			    <name>Oman</name>
			</character>
			<character>
			    <name>Pakistan</name>
			</character>
			<character>
			    <name>Panama</name>
			</character>
			<character>
			    <name>Papua New Guinea</name>
			</character>
			<character>
			    <name>Paraguay</name>
			</character>
			<character>
			    <name>Peru</name>
			</character>
			<character>
			    <name>Philippines</name>
			</character>
			<character>
			    <name>Poland</name>
			</character>
			<character>
			    <name>Portugal</name>
			</character>
			<character>
			    <name>Puerto Rico</name>
			</character>
			<character>
			    <name>Qatar</name>
			</character>
			<character>
			    <name>North Korea</name>
			</character>
			<character>
			    <name>Moldova</name>
			</character>
			<character>
			    <name>Romania</name>
			</character>
			<character>
			    <name>Russia</name>
			</character>
			<character>
			    <name>Rwanda</name>
			</character>
			<character>
			    <name>Saint Lucia</name>
			</character>
			<character>
			    <name>Samoa</name>
			</character>
			<character>
			    <name>Sao Tome and Principe</name>
			</character>
			<character>
			    <name>Saudi Arabia</name>
			</character>
			<character>
			    <name>Senegal</name>
			</character>
			<character>
			    <name>Sierra Leone</name>
			</character>
			<character>
			    <name>Singapore</name>
			</character>
			<character>
			    <name>Slovakia</name>
			</character>
			<character>
			    <name>Slovenia</name>
			</character>
			<character>
			    <name>Somalia</name>
			</character>
			<character>
			    <name>South Africa</name>
			</character>
			<character>
			    <name>Spain</name>
			</character>
			<character>
			    <name>Sri Lanka</name>
			</character>
			<character>
			    <name>Sudan</name>
			</character>
			<character>
			    <name>Suriname</name>
			</character>
			<character>
			    <name>Swaziland</name>
			</character>
			<character>
			    <name>Sweden</name>
			</character>
			<character>
			    <name>Switzerland</name>
			</character>
			<character>
			    <name>Syria</name>
			</character>
			<character>
			    <name>Tajikistan</name>
			</character>
			<character>
			    <name>Thailand</name>
			</character>
			<character>
			    <name>Macedonia</name>
			</character>
			<character>
			    <name>Timor-Leste</name>
			</character>
			<character>
			    <name>Togo</name>
			</character>
			<character>
			    <name>Tonga</name>
			</character>
			<character>
			    <name>Trinidad and Tobago</name>
			</character>
			<character>
			    <name>Tunisia</name>
			</character>
			<character>
			    <name>Turkey</name>
			</character>
			<character>
			    <name>Turkmenistan</name>
			</character>
			<character>
			    <name>Uganda</name>
			</character>
			<character>
			    <name>Ukraine</name>
			</character>
			<character>
			    <name>United Arab Emirates</name>
			</character>
			<character>
			    <name>Ireland</name>
			</character>
			<character>
			    <name>Tanzania</name>
			</character>
			<character>
			    <name>United States of America</name>
			</character>
			<character>
			    <name>United States Virgin Islands</name>
			</character>
			<character>
			    <name>Uruguay</name>
			</character>
			<character>
			    <name>Uzbekistan</name>
			</character>
			<character>
			    <name>Vanuatu</name>
			</character>
			<character>
			    <name>Venezuela</name>
			</character>
			<character>
			    <name>Vietnam</name>
			</character>
			<character>
			    <name>Yemen</name>
			</character>
			<character>
			    <name>Zambia</name>
			</character>
			<character>
			    <name>Zimbabwe</name>
			</character>
		  </characters>
		  <plot>
		   content to be displayed
		  </plot>
		  <great-lines>
		   <line></line>
		   <line></line>
		   <line></line>
		  </great-lines>
		  <rating type="thumbs">7</rating>
		  <rating type="stars">5</rating>
		 </movie>
		</movies>
		XML;


For more information send a message to info at phpclasses dot org.