This should be a FAQ...
1) make an example XML file whose DOCTYPE uses your bogus DTD
2) Decide on your favorite Parser (SAX 1 or SAX 2 or DOM), and create
an instance of one, see DOMCount.cpp, SAXCount.cpp, or
SAX2Count.cpp for details
3) set an ErrorHandler for the parser from 2)
4) Create a LocalFileInputSource instance using the file from 1)
5) invoke Parser.parser() (from 2) on your input source (from 3) and
watch the exceptions fly...
jas.
"LiChao(�)" <[EMAIL PROTECTED]> writes:
> I have defined a DTD like this:
>
> <!ELEMENT Root (P)>
> <!ELEMENT P (#PCDATA)>
> <!ELEMENT P (test)>
>
> Of course there are something wrong in the declaration. First, element *P*
> was defined twice. Second, element *test* was not defined.
>
> I want to use xerces to check the error. I had checked the example EnumVal,
> but I still have no idea of how to complete my aim.
>
> Any one can give me any help? Which example should I follow? Which API
> should I use? or etc.
>
> Any hint will be appreciated.
>
> Super
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]