You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2001/05/06 01:08:31 UTC

cvs commit: xml-xerces/perl/samples DOMCount.pl DOMPrint.pl

jasons      01/05/05 16:08:31

  Modified:    perl/samples DOMCount.pl DOMPrint.pl
  Log:
  	* samples/DOMPrint.pl (Repository):
  	* samples/DOMCount.pl (Repository):
  	uses new ErrorHandler interface
  
  Revision  Changes    Path
  1.7       +2 -5      xml-xerces/perl/samples/DOMCount.pl
  
  Index: DOMCount.pl
  ===================================================================
  RCS file: /home/cvs/xml-xerces/perl/samples/DOMCount.pl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DOMCount.pl	2001/04/12 05:09:03	1.6
  +++ DOMCount.pl	2001/05/05 23:08:31	1.7
  @@ -73,7 +73,7 @@
   #
   
   my $USAGE = "USAGE: $0 [-v][-n] file\n";
  -my $VERSION = q[$Id: DOMCount.pl,v 1.6 2001/04/12 05:09:03 jasons Exp $];
  +my $VERSION = q[$Id: DOMCount.pl,v 1.7 2001/05/05 23:08:31 jasons Exp $];
   
   getopts ('vn') and ($#ARGV == 0)	or die "$USAGE";
   -f $ARGV[0] or die "File '$ARGV[0]' does not exist!\n";
  @@ -89,10 +89,7 @@
   my $parser = XML::Xerces::DOMParser->new();
   $parser->setDoValidation ($validate);
   $parser->setDoNamespaces ($namespace);
  -my $error_handler = new XML::Xerces::perlErrorHandler;
  -$error_handler->setWarningFunction(\&XML::Xerces::warning);
  -$error_handler->setErrorFunction(\&XML::Xerces::error);
  -$error_handler->setFatalErrorFunction(\&XML::Xerces::fatal_error);
  +my $error_handler = XML::Xerces::PerlErrorHandler->new();
   $parser->setErrorHandler($error_handler);
   
   $parser->parse (XML::Xerces::LocalFileInputSource->new($file));
  
  
  
  1.6       +1 -4      xml-xerces/perl/samples/DOMPrint.pl
  
  Index: DOMPrint.pl
  ===================================================================
  RCS file: /home/cvs/xml-xerces/perl/samples/DOMPrint.pl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DOMPrint.pl	2001/04/12 05:08:43	1.5
  +++ DOMPrint.pl	2001/05/05 23:08:31	1.6
  @@ -96,10 +96,7 @@
   $parser->setDoNamespaces ($namespace);
   $parser->setDoValidation ($validate);
   $parser->setToCreateXMLDeclTypeNode(1);
  -my $ERROR_HANDLER = XML::Xerces::perlErrorHandler->new();
  -$ERROR_HANDLER->setWarningFunction(\&XML::Xerces::warning);
  -$ERROR_HANDLER->setErrorFunction(\&XML::Xerces::error);
  -$ERROR_HANDLER->setFatalErrorFunction(\&XML::Xerces::fatal_error);
  +my $ERROR_HANDLER = XML::Xerces::PerlErrorHandler->new();
   $parser->setErrorHandler($ERROR_HANDLER);
   $parser->parse (XML::Xerces::LocalFileInputSource->new($file));
   my $doc = $parser->getDocument ();
  
  
  

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