XMLReaderFactory


XMLReaderFactory org.xml.sax.helpers

Java 1.4

This factory class defines two static factory methods for creating XMLReader objects. One method takes the name of a class as its argument. It dynamically loads and instantiates the class, then casts it to an XMLReader object. The second factory method takes no arguments; it reads the system property named " org.xml.sax.driver " and uses the value of that property as the name of the class XMLReader implementation class to load and instantiate. An application that instantiates its SAX parser using the no-argument method of XMLReaderFactory gains a layer of independence from the underlying parser implementation. The end user or system administrator of the system on which the application is deployed can change the parser implementation simply by setting a system property. Note that the javax.xml.parsers package provides a similar, but somewhat more useful SAXParserFactory .

 public final class  XMLReaderFactory  {  // No Constructor   // Public Class Methods  public static org.xml.sax.XMLReader  createXMLReader  ( )          throws org.xml.sax.SAXException;        public static org.xml.sax.XMLReader  createXMLReader  (String  className  )          throws org.xml.sax.SAXException;   } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net