I've just now started using SAX2 because I like the callback method it
provides.  Problem is my xml files are coming in a directory where the
XSD isn't so parse() is bailing because the document isn't valid.  The
parsing routine is expecting the XSD to be in the same directory as
the XML.  The schemaLocation thing doesn't work like I thought and
changing this doesn't do anything.  So what so I need to do to give
the parser some direction?  I'm setting up my parser like so:

    parser = XMLReaderFactory::createXMLReader();
    parser->setFeature(XMLUni::fgSAX2CoreValidation, true);
    parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true);   // optional
    parser->setFeature(XMLUni::fgXercesValidationErrorAsFatal, true);
    parser->setValidationConstraintFatal(true);
    parser->setExitOnFirstFatalError(true);

    defaultHandler = new AuthNotifyHandler();
    parser->setContentHandler(defaultHandler);
    parser->setErrorHandler(defaultHandler);

Thanks as usual!

-- 
Kelly Beard

Reply via email to