Difference SAXParserFactory XMLReaderFactory. Which one to choose?

terminatorx

New Member
Both of them seem to have the same purpose (create a XMLReader).Some Tutorials contain the one, some the other.SAXParserFactory:example code:\[code\]// SAXParserFactorySAXParserFactory factory = SAXParserFactory.newInstance();SAXParser parser = factory.newSAXParser();XMLReader reader = parser.getXMLReader();reader.parse(new InputSource("document.xml"));\[/code\]XMLReaderFactory:example code:\[code\]// XMLReaderFactoryXMLReader xmlReader = XMLReaderFactory.createXMLReader();xmlReader.parse(new InputSource("document.xml"));\[/code\]question:Are these the main differences or are there some i've overseen.Which one should you choose?
 
Back
Top