|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.parsers.DocumentBuilderFactory
Responsible for creating new DOM parsers
Normally, users will create a DOM parser as follows:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder parser = factory.newDocumentBuilder();
Document doc = parser.parse(myInputSource);
DocumentBuilderFactory uses the system property javax.xml.parsers.XmlDocumentParserFactory to find the class to load. So you can change the parser by calling:
System.setProperty("javax.xml.parsers.XmlDocumentParserFactory",
"com.foo.myFactory");
Constructor Summary | |
DocumentBuilderFactory()
|
Method Summary | |
boolean |
isNamespaceAware()
Returns whether the parser should namespace aware |
boolean |
isValidating()
Returns whether the parser should namespace aware |
abstract DocumentBuilder |
newDocumentBuilder()
Creates a new DocumentBuilder() |
static DocumentBuilderFactory |
newInstance()
Returns a new DocumentBuilderFactory instance based on the javax.xml.parsers.DocumentBuilderFactory system property. |
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 DocumentBuilderFactory()
Method Detail |
public static DocumentBuilderFactory newInstance()
public abstract DocumentBuilder newDocumentBuilder() throws ParserConfigurationException
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 |