XML DOCUMENTS AND DOM
1. Create XML file named “Item.xml”with item-name, item-rate, item
quantity Store the details of 5 Items of different Types.
2. Write PHP script to read “book.xml” file into simpleXML object.
Display attributes and elements .
( simple_xml_load_file() function )
3. Write a PHP script to read “Movie.xml” file and print all
MovieTitle and ActorName of file using DOMDocument Parser.
“Movie.xml” file should contain following information with at least
5 records With values. MovieInfo,MovieNo, MovieTitle, ActorName
,ReReleaseYear.
4. create a student.xml file containing at least 5 student
information.
5. Create a XML file which gives details of books available in
“Bookstore” from following
1) Yoga
2) Story
3) Technical
And elements in each category are in the following format
<Book>
<Book_Title>
--------------</Book_Title>
<Book_Author> ---------------</Book_Author>
<Book_Price>
--------------</Book_Price>
</Book>
Save the file as “Bookcategory.xml”
6. Write a PHP script to create student.xml file which contains
student roll no, name, address, college And course. Print
students detail of specific course in tabular format after
accepting course as input.
7. Write a script to create “cricket.xml” file with multiple elements
as shown below:
<CricketTeam>
<Team country=”Australia”>
<player>____</player>
<runs>______</runs>
<wicket>____</wicket>
</Team>
</CricketTeam>
8. Write a script to add multiple elements in “cricket.xml” file of
category, country=”India”.