I'm trying to solve problem with xml validation in oracle jvm
And found another examples of doing that:
SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(false); factory.setNamespaceAware(true);
SchemaFactory schemaFactory =
SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
factory.setSchema(schemaFactory.newSchema(
new Source[] {new StreamSource("contacts.xsd")}));
SAXParser parser = factory.newSAXParser();
XMLReader reader = parser.getXMLReader();
reader.setErrorHandler(new SimpleErrorHandler());
reader.parse(new InputSource("document.xml"));
But it seems to me that this example expecting to use newer version of Java therefore some methods and classes are absent in my JVM. They are SchemaFactory class and setSchema method of SAXParserFactory class. I want to update, but I didn't found on oracle's tech support forums that it is posssible at all.