Hi,

At the moment I validate my xml against my xsd by having my xml
reference my xsd in the xsdSchemaLocation attribute as standard and
using the parse method on the XercesDOMParser as follows:

    XercesDOMParser *parser = new XercesDOMParser;    
   
    parser->setValidationScheme(XercesDOMParser::Val_Always);
    parser->setDoNamespaces(true);
    parser->setDoSchema(true);
    parser->setValidationSchemaFullChecking(true);
    
    //Register an error reporter to catch errors in the parsing
    DOMTreeErrorReporter *errReporter = new DOMTreeErrorReporter();
    parser->setErrorHandler(errReporter);
    
    //Create a memBufInputSource to tell Xerces where to find the xml
    char bufId[] = "updatedNewData";
    MemBufInputSource mb((const   XMLByte* const) updatedNewData, 
                        strlen(updatedNewData),XStr(bufId).unicodeForm());
    

    //Parse the incoming xml!
    try
    {
        parser->parse(mb);
    }





. However, in my application, I have my xsd cached in DOM form. I feel
that the regular way of validating could be speeded up if there was an
API available to parse a given XML input against a xsd in DOM form, eg
void parse(XmlCh *xml, DOMDocument *xsd);
Is there any way like this I could take advantage of the fact that I
already have the xsd cached in DOM form and not go through the method I
am using above, which I feel is probably redoing what I have already
done, ie reparsing my xsd?

Allan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to