You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2005/07/25 01:41:05 UTC

cvs commit: xml-xerces/java/samples/jaxp SourceValidator.java

mrglavas    2005/07/24 16:41:05

  Modified:    java/samples/jaxp SourceValidator.java
  Log:
  Register an error handler with the DocumentBuilder.
  
  Revision  Changes    Path
  1.2       +2 -1      xml-xerces/java/samples/jaxp/SourceValidator.java
  
  Index: SourceValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/jaxp/SourceValidator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SourceValidator.java	1 Jun 2005 04:48:36 -0000	1.1
  +++ SourceValidator.java	24 Jul 2005 23:41:05 -0000	1.2
  @@ -462,6 +462,7 @@
                       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                       dbf.setNamespaceAware(true);
                       DocumentBuilder db = dbf.newDocumentBuilder();
  +                    db.setErrorHandler(sourceValidator);
                       for (int j = 0; j < length; ++j) {
                           String systemId = (String) instances.elementAt(j);
                           Document doc = db.parse(systemId);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org