|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.parsers.SAXParserFactory
Responsible for creating new SAXParsers.
Normally, users will create a SAX parser as follows:
SAXParserFactory factory = SAXParserFactory.newInstance();
Parser parser = factory.newSAXParser();
parser.setDocumentHandler(myDocumentHandler);
parser.parse(myInputSource);
SAXParserFactory uses the system property javax.xml.parsers.SAXParserFactory to find the class to load. So you can change the parser by calling:
System.setProperty("javax.xml.parsers.SAXParserFactory", "com.foo.myFactory");
Constructor Summary | |
SAXParserFactory()
|
Method Summary | |
boolean |
isNamespaceAware()
Returns whether the parser should namespace aware |
boolean |
isValidating()
Returns whether the parser should namespace aware |
static SAXParserFactory |
newInstance()
Returns a new SAXParserFactory instance based on the javax.xml.parsers.SAXParserFactory system property. |
abstract SAXParser |
newSAXParser()
Creates a new SAXParser() |
void |
setNamespaceAware(boolean aware)
When creating a parser, create a namespace aware parser. |
void |
setValidating(boolean validating)
When creating a parser, create a validating one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SAXParserFactory()
Method Detail |
public static SAXParserFactory newInstance()
public abstract SAXParser newSAXParser() throws ParserConfigurationException, SAXException
public void setNamespaceAware(boolean aware)
public void setValidating(boolean validating)
public boolean isNamespaceAware()
public boolean isValidating()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |