|
Creating new SAX parser to parse XML document |
|
|
Since SAX is only an interface, in order to use it the application
must define its implementation. SAX parser implementation in Java can be
set via system-property javax.xml.parsers.SAXParserFactory.
Since Xerces package was integrated to Java Runtime Envorinment,
this implementation is used by default. By this reason, in common case
there is no need to specify alternate parsers:
// creating built-in (default) implementation of SAX:
SAXParserFactory factory = SAXParserFactory.newInstance();
// create SAX-parser...
SAXParser parser = factory.newSAXParser();
// now we are ready to parse XML data...
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.