
March 25th, 2004, 08:20 AM
|
|
Registered User
|
|
Join Date: Oct 2002
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Problem with Schema validation in XercesXMLParser
Hi All Great Hackers
I have strange problem. I need to validate an xml file using Schema.
(Xerces (C++) XML parser v. 2.3 on Debian GNU/Linux) I,ve written something like this:
XercesDOMParser *parser=new XercesDOMParser();
MyDOMErrorHandler* errHandler = new MyDOMErrorHandler(); //MyDOMErrorHandler is defined elsewhere of course 
parser->setErrorHandler((ErrorHandler *)errHandler);
DOMDocument *doc;
try {
parser->setValidationScheme(XercesDOMParser::Val_Always);
parser->loadGrammar(settings.getOption("grammar_file.xsd"),Grammar::SchemaGrammarType,true);
parser->useCachedGrammarInParse(true);
parser->parse("my_file.xml");
and this program breaks at this point and I get a message:
Illegal instruction
I tried to debug that with gdb but without any result.
What's the problem?
thanx in advance
Cinek
|