Post Top Ad

2014/04/28

(IXJ) 2 - Use SAX to read XML File

Use SAX to read XML File

Video: ( Nguồn: Thầy Phạm Anh Đới) Click here

Quiz: Click here

Demo: Click here
Count number of tag in the tomcatusers.xml file 

Practice: Click here
1. Create a program to accept the tomcat-users.xml file as a command line parameter and count the number of users defined in this configuration file. At theend of processing, it requires to print the number of users on the console.
2. Create the student.xml file that stores a list of registered students. Write a program for printing the name and ID of all registered students provided in student.xml.
Make necessary arrangements to accept a command line parameter from the user to specify the name of the XML document that holds the list of registered students.
3. Write a program which demonstrates the use of SAX parser for a simple search in XML document. The program searches a specified user in the tomcatusers.xml file and prints an the role of the given user on search completion.
This program should include two command-line parameters. The first parameter specifies the tomcat-users.xml file and the second parameter specifies the username to search in the configuration file.
4/28/2014 / by / 0 Comments

Không có nhận xét nào:

Đăng nhận xét

Được tạo bởi Blogger.

Post Top Ad