Xerces Programming
Tips
* If you parse the document in the constructor, keep a method to return the parsed doc.
In case of explicit parse methods also, it is a good idea to have a method returning
doc.
* Some of the properties of DOM Parser can be set using the setFeature() method.
* Incase we are extending the parser to get functionality specific to our problem, it makes
sense to graft a method , which can be named print(), which does the printing specific to our problem.
Usually this method is a giant switch case, with customized processing for each tag.
* If we are writing our own parsers, we may be required to provide customized processing of methods in
XMLDocumentHandler interface. Some imp methods are :-
a) startDocument()
b) startElement()
c) comment()
d) characters()
*
* If you parse the document in the constructor, keep a method to return the parsed doc.
In case of explicit parse methods also, it is a good idea to have a method returning
doc.
* Some of the properties of DOM Parser can be set using the setFeature() method.
* Incase we are extending the parser to get functionality specific to our problem, it makes
sense to graft a method , which can be named print(), which does the printing specific to our problem.
Usually this method is a giant switch case, with customized processing for each tag.
* If we are writing our own parsers, we may be required to provide customized processing of methods in
XMLDocumentHandler interface. Some imp methods are :-
a) startDocument()
b) startElement()
c) comment()
d) characters()
*
Comments:
Post a Comment