Hello everybody,

This is my first day with xerces-c++ and i think i will use it. I found no 
other c++ library at that high level. Respect and thanks to the developers.
I mangaged to complie and install it, and to parse a file.

But the validation does not behave as i expect.
I thought i would get an error, because <Task> has no member <Name>.

Can someone please help? 

---- todo.xml: ----

<?xml version="1.0" standalone="no"?>
<!DOCTYPE TodoList SYSTEM "todo.dtd">
<TodoList>
  <Task>
    <Name>do something</Name>
  </Task>
</TodoList>

---- todo.dtd: ----

<!-- DTD for Todo project -->
<!ELEMENT TodoList (Task)>
<!ELEMENT Task EMPTY>
<!-- ELEMENT Name (#PCDATA) -->

---- code: ----

        XMLPlatformUtils::Initialize();
        XercesDOMParser* parser = new XercesDOMParser();

        parser->setValidationScheme(XercesDOMParser::Val_Always);
        parser->setValidationSchemaFullChecking(true);
        parser->setIncludeIgnorableWhitespace(false);
        parser->setDoNamespaces(true);

        ErrorHandler* errHandler = (ErrorHandler*) new HandlerBase();
        parser->setErrorHandler(errHandler);

        parser->parse("todo.xml");



-- 
---------------------------------------------------------------------
Christoph Kies ([EMAIL PROTECTED])
Mobil: 0179/ 5910 805
Fax: 089/ 1488 213 020 (bis 31.03.2006)

Lindenkamp 4
59469 Ense
---------------------------------------------------------------------

Reply via email to