[Pharo-project] XML and DTD

Olivier Auverlot olivier.auverlot at gmail.com
Fri Apr 29 15:36:32 CEST 2011

Le 29/04/11 14:02, Torsten Bergmann a écrit :
> AFAIK there are various possibilities to check an XML:
>   a) using an internal DTD
>   b) using an external DTD (in a file)
>   c) using an external schema
>   d) mixing internal dtd and external dtd
> To validate using an internal DTD (a) the validation
> on the parser has to be set to true. Thats all, at least
> in Java:
> DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
> factory.setValidating(true);
> Havent tried the Pharo implementation, dont know if it is
> complete or not. Maybe a) is at least supported.
> Only Michael Rüger (Impara.de) may be able to tell you
> since he wrote the original code AFAIK.
> You can also dig through the code or try an example
> to see if the setting #isValidating: has any effect.
Setting #isValidating seems not have any effect. The parser ignores the 
errors in the XML file.
> Did you check the unit tests on squeaksource.com/XMLSupport
> Maybe they are useful too.
I had not found any complementary informations into this files

aaarrrgh ! I think that validating is not possible with XML-Parser...

Doctor Who. Where are you ? :-)
> Bye
> T.

More information about the Pharo-project mailing list