avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mirceat...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax Parser.java
Date Sun, 13 Oct 2002 03:26:09 GMT
mirceatoma    2002/10/12 20:26:09

  Added:       xmlutil/src/java/org/apache/excalibur/xml/sax Parser.java
  Log:
  Move from org.apache.avalon.excalibur.xml package.
  Remove DOM parsing since some parsers implement only the SAX spec.
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/Parser.java
  
  Index: Parser.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.excalibur.xml.sax;
  
  import java.io.IOException;
  import org.apache.avalon.framework.component.Component;
  import org.w3c.dom.Document;
  import org.xml.sax.ContentHandler;
  import org.xml.sax.InputSource;
  import org.xml.sax.SAXException;
  import org.xml.sax.ext.LexicalHandler;
  
  /**
   * The parser can be used to parse any XML document given
   * by a {@link InputSource} object.
   * It can either send XML events or create a DOM from
   * the parsed document.
   *
   * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
   * @version CVS $Revision: 1.1 $ $Date: 2002/10/13 03:26:09 $
   */
  public interface Parser
      extends Component
  {
      String ROLE = Parser.class.getName();
  
      /**
       * Parse the {@link InputSource} and send
       * SAX events to the consumer.
       * Attention: the consumer can  implement the
       * {@link LexicalHandler} as well.
       * The parse should take care of this.
       */
      void parse( InputSource in, ContentHandler consumer )
          throws SAXException, IOException;
  
      /**
       * Parse the {@link InputSource} and send
       * SAX events to the content handler and
       * the lexical handler.
       */
      void parse( InputSource in,
                  ContentHandler contentHandler,
                  LexicalHandler lexicalHandler )
          throws SAXException, IOException;
  }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message