|
|||||||||
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 | |
abstract boolean |
getFeature(java.lang.String name)
Returns the named feature. |
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() |
abstract void |
setFeature(java.lang.String name,
boolean value)
Sets the named feature. |
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 boolean getFeature(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException
public abstract void setFeature(java.lang.String name, boolean value) throws org.xml.sax.SAXNotRecognizedException
name
- the feature name.value
- the feature valuepublic boolean isNamespaceAware()
public void setNamespaceAware(boolean aware)
public boolean isValidating()
public void setValidating(boolean validating)
public abstract SAXParser newSAXParser() throws ParserConfigurationException, org.xml.sax.SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |