Error while trying to validate XML in Java -


I'm trying to create an XML with a local schema, but is throwing some bizarre error. My code:

  SAXParserFactory factory = SAXParserFactory.newInstance (); Factory.setValidating (true); Factory.setNamespaceAware (true); SchemaFitcher schemafactor = SchemaFactor New Intense ("http://www.w3.org/2001/XMLSchema"); Factory.setSchema (schemaFactory.newSchema (new source [] {new Strymsors ( "\\. \\ schema \\ xsd_me_ne_diaria.xsd")})));  

And follow my stack trace.

  java.lang.UnsupportedOperationException: It SaxValidacao.validateSchema does not parser supports "tap" version "clear" on javax is .xml.parsers.SAXParserFactory.setSchema (Unknown Source) (SaxValidacao .java36)  

The error throws after the setSchema is called.

Some clues or some other tip for XML verification in Java?

Sometimes it happens that a different version is a mix of parser if you want Java 5 or If you use higher, try removing references to any external xalan or xerces libraries. (All you need to implement on XML, which is included in the standard distribution of Java 5)


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -