cziegeler    2003/01/14 00:52:49

  Modified:    xmlutil/src/java/org/apache/excalibur/xml/sax Parser.java
                        JaxpParser.java JTidyHTMLParser.java
  Log:
  Adding service method parse()
  
  Revision  Changes    Path
  1.4       +11 -1     
jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/Parser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Parser.java       12 Nov 2002 23:35:34 -0000      1.3
  +++ Parser.java       14 Jan 2003 08:52:48 -0000      1.4
  @@ -28,6 +28,16 @@
   
       /**
        * Parse the [EMAIL PROTECTED] InputSource} and send
  +     * SAX events to the consumer.
  +     * Attention: the consumer can  implement the
  +     * [EMAIL PROTECTED] LexicalHandler} as well.
  +     * The parse should take care of this.
  +     */
  +    void parse( InputSource in, ContentHandler consumer )
  +        throws SAXException, IOException;
  +
  +    /**
  +     * Parse the [EMAIL PROTECTED] InputSource} and send
        * SAX events to the content handler and
        * the lexical handler.
        */
  
  
  
  1.6       +15 -1     
jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/JaxpParser.java
  
  Index: JaxpParser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/JaxpParser.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JaxpParser.java   15 Nov 2002 12:43:31 -0000      1.5
  +++ JaxpParser.java   14 Jan 2003 08:52:48 -0000      1.6
  @@ -224,6 +224,20 @@
       }
   
       /**
  +     * Parse the [EMAIL PROTECTED] InputSource} and send
  +     * SAX events to the consumer.
  +     * Attention: the consumer can  implement the
  +     * [EMAIL PROTECTED] LexicalHandler} as well.
  +     * The parse should take care of this.
  +     */
  +    public void parse( InputSource in, ContentHandler consumer )
  +        throws SAXException, IOException
  +    {
  +        this.parse( in, consumer, 
  +                    (consumer instanceof LexicalHandler ? 
(LexicalHandler)consumer : null));
  +    }
  +
  +    /**
        * Creates a new [EMAIL PROTECTED] XMLReader} if needed.
        */
       private void setupXMLReader()
  
  
  
  1.3       +16 -1     
jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/JTidyHTMLParser.java
  
  Index: JTidyHTMLParser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/JTidyHTMLParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JTidyHTMLParser.java      7 Dec 2002 01:00:51 -0000       1.2
  +++ JTidyHTMLParser.java      14 Jan 2003 08:52:48 -0000      1.3
  @@ -74,5 +74,20 @@
           final Document document = m_tidy.parseDOM( in.getByteStream(), null 
);
           m_serializer.serialize( document, contentHandler, lexicalHandler );
       }
  +    
  +    /**
  +     * Parse the [EMAIL PROTECTED] InputSource} and send
  +     * SAX events to the consumer.
  +     * Attention: the consumer can  implement the
  +     * [EMAIL PROTECTED] LexicalHandler} as well.
  +     * The parse should take care of this.
  +     */
  +    public void parse( InputSource in, ContentHandler consumer )
  +        throws SAXException, IOException
  +    {
  +        this.parse( in, consumer, 
  +                    (consumer instanceof LexicalHandler ? 
(LexicalHandler)consumer : null));
  +    }
  +    
   }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to