Thứ Tư, 30 tháng 7, 2014

VALIDATE XML USING VALIDATOR AND ERROR HANDLER

VALIDATE XML USING VALIDATOR AND ERROR HANDLER

Moudle 3.1

Create an application, which demonstrates the generation of an error during parsing an XML document. Write the codefor handling different types of errors and exceptions. Define an endDocument() method to override the contentHandler. Declare a method to override the error method of errorhandler.
xml file

class entend DefaultHandler

main class

Module 3.2
Create an application, which demonstrates the implementations of DTDHandler interface methods. As the DefaultHandler implements the DTDHandler interface, you need to override the desiredmethods of DTDHandler interface.
xml file
Handler



Module 3.3
Create an application that demonstrates the implementations of LexicalHandler interface methods The application should display the number of entities, CDATA, and comments in the Report.xml document.
Xml file including entity ,comment, cdata items

Handler object, startEntity(), startComment(),comment() should display number of entities, CDATA and comments

Main class display variable , countEntity, countComment..


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

Đăng nhận xét