You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Ian Roberts <ir...@decisionsoft.com> on 2001/01/12 18:08:51 UTC
Re: DOM and XML validation
On Fri, 12 Jan 2001, Alain De wrote:
> public ParseTest() {
> try {
>
> domParser.setFeature("http://xml.org/sax/features/validation",
> true);
> } catch (Exception e) {
> e.printStackTrace();
> }
> InputSource source = null;
> source = new InputSource("/pizza.xml");
> try {
> domParser.parse(source);
> } catch (Exception e) {
> e.printStackTrace();
> }
> domParser.setErrorHandler(this);
You have to call setErrorHandler *before* you call parse.
Ian
--
Ian Roberts | irr@decisionsoft.com
DecisionSoft Ltd. | http://www.decisionsoft.com/