Buggy code:
public class NonValidatingConfiguration extends BasicParserConfiguration implements XMLPullParserConfiguration { protected static final String WARN_ON_DUPLICATE_ATTDEF = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . WARN_ON_DUPLICATE_ATTDEF_FEATURE ) ; protected static final String WARN_ON_DUPLICATE_ENTITYDEF = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . WARN_ON_DUPLICATE_ENTITYDEF_FEATURE ) ; protected static final String WARN_ON_UNDECLARED_ELEMDEF = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . WARN_ON_UNDECLARED_ELEMDEF_FEATURE ) ; protected static final String ALLOW_JAVA_ENCODINGS = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . ALLOW_JAVA_ENCODINGS_FEATURE ) ; protected static final String CONTINUE_AFTER_FATAL_ERROR = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . CONTINUE_AFTER_FATAL_ERROR_FEATURE ) ; protected static final String LOAD_EXTERNAL_DTD = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . LOAD_EXTERNAL_DTD_FEATURE ) ; protected static final String NOTIFY_BUILTIN_REFS = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . NOTIFY_BUILTIN_REFS_FEATURE ) ; protected static final String NOTIFY_CHAR_REFS = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . NOTIFY_CHAR_REFS_FEATURE ) ; protected static final String NORMALIZE_DATA = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . SCHEMA_NORMALIZED_VALUE ) ; protected static final String SCHEMA_ELEMENT_DEFAULT = ( Constants . XERCES_FEATURE_PREFIX ) + ( Constants . SCHEMA_ELEMENT_DEFAULT ) ; protected static final String ERROR_REPORTER = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . ERROR_REPORTER_PROPERTY ) ; protected static final String ENTITY_MANAGER = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . ENTITY_MANAGER_PROPERTY ) ; protected static final String DOCUMENT_SCANNER = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . DOCUMENT_SCANNER_PROPERTY ) ; protected static final String DTD_SCANNER = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . DTD_SCANNER_PROPERTY ) ; protected static final String XMLGRAMMAR_POOL = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . XMLGRAMMAR_POOL_PROPERTY ) ; protected static final String DTD_VALIDATOR = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . DTD_VALIDATOR_PROPERTY ) ; protected static final String NAMESPACE_BINDER = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . NAMESPACE_BINDER_PROPERTY ) ; protected static final String DATATYPE_VALIDATOR_FACTORY = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . DATATYPE_VALIDATOR_FACTORY_PROPERTY ) ; protected static final String VALIDATION_MANAGER = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . VALIDATION_MANAGER_PROPERTY ) ; protected static final String SCHEMA_VALIDATOR = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . SCHEMA_VALIDATOR_PROPERTY ) ; private static final boolean PRINT_EXCEPTION_STACK_TRACE = false ; protected XMLGrammarPool fGrammarPool ; protected DTDDVFactory fDatatypeValidatorFactory ; protected XMLErrorReporter fErrorReporter ; protected XMLEntityManager fEntityManager ; protected XMLDocumentScanner fScanner ; protected XMLInputSource fInputSource ; protected XMLDTDScanner fDTDScanner ; protected XMLNamespaceBinder fNamespaceBinder ; protected ValidationManager fValidationManager ; private XMLNSDocumentScannerImpl fNamespaceScanner ; private XMLDocumentScannerImpl fNonNSScanner ; protected XMLLocator fLocator ; protected boolean fParseInProgress = false ; public NonValidatingConfiguration ( ) { } public NonValidatingConfiguration ( SymbolTable symbolTable ) { } public NonValidatingConfiguration ( SymbolTable symbolTable , XMLGrammarPool grammarPool ) { } public NonValidatingConfiguration ( SymbolTable symbolTable , XMLGrammarPool grammarPool , XMLComponentManager parentSettings ) { } public void setLocale ( Locale locale ) throws XNIException { } public void setInputSource ( XMLInputSource inputSource ) throws IOException , XMLConfigurationException { } public boolean parse ( boolean complete ) throws IOException , XNIException { } public void cleanup ( ) { } public void parse ( XMLInputSource source ) throws IOException , XNIException { } protected void reset ( ) throws XNIException { } protected void configurePipeline ( ) { if ( ( fFeatures . get ( NAMESPACES ) ) == ( Boolean . TRUE ) ) { if ( ( fNamespaceScanner ) == null ) { fNamespaceScanner = new XMLNSDocumentScannerImpl ( ) ; addComponent ( ( ( XMLComponent ) ( fNamespaceScanner ) ) ) ; } fProperties . put ( NonValidatingConfiguration . DOCUMENT_SCANNER , fNamespaceScanner ) ; <START_BUG> fNamespaceScanner . setComponents ( null , null , fDocumentHandler ) ; <END_BUG> fScanner = fNamespaceScanner ; } else { if ( ( fNonNSScanner ) == null ) { fNonNSScanner = new XMLDocumentScannerImpl ( ) ; addComponent ( ( ( XMLComponent ) ( fNonNSScanner ) ) ) ; } fProperties . put ( NonValidatingConfiguration . DOCUMENT_SCANNER , fNonNSScanner ) ; fScanner = fNonNSScanner ; } fScanner . setDocumentHandler ( fDocumentHandler ) ; fLastComponent = fScanner ; if ( ( fDTDScanner ) != null ) { fDTDScanner . setDTDHandler ( fDTDHandler ) ; fDTDScanner . setDTDContentModelHandler ( fDTDContentModelHandler ) ; } } protected void checkFeature ( String featureId ) throws XMLConfigurationException { } protected void checkProperty ( String propertyId ) throws XMLConfigurationException { } protected XMLEntityManager createEntityManager ( ) { } protected XMLErrorReporter createErrorReporter ( ) { } protected XMLDocumentScanner createDocumentScanner ( ) { } protected XMLDTDScanner createDTDScanner ( ) { } protected XMLNamespaceBinder createNamespaceBinder ( ) { } protected DTDDVFactory createDatatypeValidatorFactory ( ) { } protected ValidationManager createValidationManager ( ) { } }

Fix:
fNamespaceScanner . setDTDValidator ( null ) ;