001/* ----------------------------------------------------------------------------
002   The Kiwi Toolkit - A Java Class Library
003   Copyright (C) 1998-2004 Mark A. Lindner
004
005   This library is free software; you can redistribute it and/or
006   modify it under the terms of the GNU General Public License as
007   published by the Free Software Foundation; either version 2 of the
008   License, or (at your option) any later version.
009
010   This library is distributed in the hope that it will be useful,
011   but WITHOUT ANY WARRANTY; without even the implied warranty of
012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013   General Public License for more details.
014
015   You should have received a copy of the GNU General Public License
016   along with this library; if not, write to the Free Software
017   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
018   02111-1307, USA.
019 
020   The author may be contacted at: mark_a_lindner@yahoo.com
021   ----------------------------------------------------------------------------
022   $Log: XMLConsumer.java,v $
023   Revision 1.2  2004/05/05 22:47:37  markl
024   comment block updates
025
026   Revision 1.1  2004/05/05 18:47:08  markl
027   classes renamed
028
029   Revision 1.5  2003/01/19 09:34:27  markl
030   Javadoc & comment header updates.
031
032   Revision 1.4  2001/03/12 02:18:29  markl
033   Source code cleanup.
034
035   Revision 1.3  1999/06/04 07:10:44  markl
036   Fixed javadoc error.
037
038   Revision 1.2  1999/01/10 03:37:18  markl
039   added GPL header & RCS tag
040   ----------------------------------------------------------------------------
041*/
042
043package kiwi.text;
044
045 /** An interface for consuming parsed XML data. See <code>XMLParser</code>
046   * for more details.
047   *
048   * @see kiwi.text.XMLParser
049   *
050   * @author Mark Lindner
051   */
052
053public interface XMLConsumer
054  {
055
056  /** Process an XML element. This method is called by the XML parser for
057    * each complete XML element in the input.
058    *
059    * @param e The <code>XMLElement</code> to process.
060    *
061    * @return A flag specifying whether whitespace-sensitive mode
062    * should be turned on. If the value <code>true</code> is returned,
063    * the parser treats all subsequent whitespace literally. If
064    * <code>false</code> is returned, the parser collapses contiguous
065    * sequences of whitespace into a single space (the default
066    * mode). Whitespace in this context denotes spaces, tabs,
067    * newlines, and formfeed characters.
068    */
069
070  public boolean consumeElement(XMLElement e);
071
072  /** Process text. This method is called by the XML parser for each
073    * maximally contiguous sequence of text in the input.
074    *
075    * @param text The text to process.
076    */
077  
078  public void consumeText(String text);
079  }
080
081/* end of source file */