[Home] [By Thread] [By Date] [Recent Entries]


At 2:26 PM -0300 3/29/04, Jose Airton wrote:
I found this solution:

     SAXParserFactory factory = SAXParserFactory.newInstance();
     SAXParser saxParser = factory.newSAXParser();
     XMLReader xmlReader = saxParser.getXMLReader();
 
xmlReader.setFeature("<http://apache.org/xml/features/validation/schema>http://apache.org/xml/features/validation/schema", 
true);

This likely will not work because the parser you have created is not 
namespace aware.

Do not use SAXParserFactory or SAXParser ever. Use XMLReaderFactory 
and XMLReader instead.
-- 

   Elliotte Rusty Harold
   elharo@m...
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml            
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA 

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member