private XMLReaders(int validate) {
		SAXParserFactory fac = SAXParserFactory.newInstance();
		boolean val = false;
		Exception problem = null;
		// All JDOM parsers are namespace aware.
		fac.setNamespaceAware(true);
		switch (validate) {
			case 0:
				fac.setValidating(false);
				break;
			case 1:
				fac.setValidating(true);
				val = true;
				break;
			case 2:
				fac.setValidating(false);
				try {
					SchemaFactory sfac = SchemaFactory.
							newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
					Schema schema = sfac.newSchema();
					fac.setSchema(schema);
					val = true;
				} catch (SAXException se) {
					// we could not get a validating system, set the fac to null
					fac = null;
					problem = se;
				} catch (IllegalArgumentException iae) {
					// this system does not support XSD Validation.... which is true for android!
					// we could not get a validating system, set the fac to null
					fac = null;
					problem = iae;
				} catch (UnsupportedOperationException uoe) {
					// SAXParserFactory throws this exception when setSchema is called.
					// Therefore every factory throws this exception unless it overrides
					// setSchema. A popular example is Apache Xerces SAXParserFactoryImpl
					// before version 2.7.0.
					fac = null;
					problem = uoe;
				}
				break;
		}
		jaxpfactory = fac;
		validates = val;
		failcause = problem;
	}