Code example for XMLReader

Methods: getFeature

0
String version = (locator instanceof Locator2) ?
        ((Locator2) locator).getXMLVersion() : null;
      String encoding = (locator instanceof Locator2) ? 
        ((Locator2) locator).getEncoding() : null;
      boolean standalone =
        reader.getFeature("http://xml.org/sax/features/is-standalone");
      boolean standaloneDeclared = standalone;
      boolean encodingDeclared = (encoding != null);
      events.add(new StartDocumentImpl(location,
                                       location.getLocationURI(),
                                       encoding,
                                       version,
                                       standalone,
                                       standaloneDeclared,
                                       encodingDeclared));
    } 
 
    public void endDocument() 
      throws SAXException 
Connect your IDE to all the code out there  Get Codota for Java