Nuri Ensing
Nuri Ensing

Reputation: 2030

Difference SAXParserFactory and DocumentBuilderFactory

What is the difference between SAXParserFactory and DocumentBuilderFactory. And which one to use when?

Respectively:

javax.xml.parsers.SAXParserFactory

Selects the SAX parser. By default, org.apache.xerces.jaxp.SAXParserFactoryImpl from the XML4J library is used.

javax.xml.parsers.DocumentBuilderFactory

Selects the document builder. By default, org.apache.xerces.jaxp.DocumentBuilderFactoryImpl from the XML4J library is used.

Upvotes: 0

Views: 1771

Answers (0)

Related Questions