Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Customized Onsite Training: Java 7, JSF 2, PrimeFaces, Servlets/JSP, Ajax/jQuery, Android, Spring, Hibernate, Hadoop, GWT, REST, etc:

http://courses.coreservlets.com/

XML and DOM


1. 2. 3. 4. 5.
Look at bad.xml in the XML examples project. Use an ordinary text editor like Notepad or Textpad and see if you can spot what is wrong with it. (Eclipse has XML support so will directly tell you what is wrong.) Invoke DomTest4 on bad.xml. Design an XML structure to represent the people in a company department. The department should have a name and an arbitrary number of staff members. Each staff member should have a name and employee ID. Make an XML file representing a small fictitious department. Verify that it is well-formed by invoking DomTest4 on it. Make a DOM program that prints the department name. Make a DOM program that prints the department name and the name of each employee.

You might also like