So, how can I validate a XML file with a DTD. Wich class should I
use ?
On 6 jan, 11:51, "Jonathan Parker" <[email protected]>
wrote:
> The feature name is any fully-qualified URI. It is possible for an XMLReader
> to recognize a feature name but to be unable to set its value; this is
> especially true in the case of an adapter for a
> SAX1Parser<http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/Parser.html>,
> which has no way of affecting whether the underlying parser is validating,
> for example.
>
> This is
> from:http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/XMLReader.html#se...,
> boolean)
>
> On Tue, Jan 6, 2009 at 8:20 PM, Nico <[email protected]> wrote:
>
> > Hi,
> > I need to validate XML files with DTD. I use this code :
>
> > SAXParserFactory spf = SAXParserFactory.newInstance();
> > SAXParser sp = spf.newSAXParser();
> > XMLReader analyser = sp.getXMLReader();
> > analyser.setFeature("http://xml.org/sax/features/validation", true);
> > analyser.setErrorHandler(handler);
> > analyser.parse(path);
>
> > I have this error message :
> > Cannot enablehttp://xml.org/sax/features/validation
>
> > How can I fix it ?
>
> > Thx.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---