Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How use XMLReaderFactory now? because this is deprecated

I'm trying use XMLReaderFactory, but this is deprecated. Now, how Can I create a instance of XMLReader?

like image 515
Igor Rodrigues Avatar asked Jun 27 '18 22:06

Igor Rodrigues


1 Answers

The documentation for XMLReaderFactory recommends SAXParserFactory

SAXParserFactory parserFactory = SAXParserFactory.newInstance();
SAXParser parser = parserFactory.newSAXParser();
XMLReader reader = parser.getXMLReader();
like image 72
Richard Avatar answered Sep 28 '22 01:09

Richard