DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4276>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4276 Security feature Summary: Security feature Product: Xerces2-J Version: 2.0.0 [alpha] Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: SAX AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I am attempting to set the security feature and when parsing through my xml doc I am getting the following error: Element type "animals" must be declared (which happens to be my root directory). I must be doing something wrong or leaving something out of my XML doc. I am attempting to match this up against a schema and have been using Oreilly's example when running into this problem. The code is as follows: try { // Instantiate a parser XMLReader parser = XMLReaderFactory.createXMLReader( "org.apache.xerces.parsers.SAXParser"); // Register the content handler parser.setContentHandler(contentHandler); // Register the error handler parser.setErrorHandler(errorHandler); // Turn on validation parser.setFeature("http://xml.org/sax/features/validation", true); // Parse the document parser.parse(uri); } catch (IOException e) { System.out.println("Error reading URI: " + e.getMessage()); } catch (SAXException e) { System.out.println("Error in parsing: " + e.getMessage()); } Thanks, Brian Miles --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
