001/* 002 * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. 003 * 004 * This software is open source. 005 * See the bottom of this file for the licence. 006 * 007 * $Id: ElementHandler.java,v 1.3 2001/05/18 19:18:53 drwhite Exp $ 008 */ 009 010package org.dom4j; 011 012/** <p><code>ElementHandler</code> interface defines a handler of 013 * <code>Element</code> objects. 014 * It is used primarily in event based processing models such as for 015 * processing large XML documents as they are being parsed rather than 016 * waiting until the whole document is parsed.</p> 017 * 018 * @author <a href="mailto:james.strachan@metastuff.com">James Strachan</a> 019 * @version $Revision: 1.3 $ 020 */ 021public interface ElementHandler { 022 023 /** Called by an event based processor when an elements openning 024 * tag is encountered. 025 * 026 * @param elementPath is the current <code>ElementPath</code> 027 * to process 028 */ 029 public void onStart(ElementPath elementPath); 030 031 /** Called by an event based processor when an elements closing 032 * tag is encountered. 033 * 034 * @param elementPath is the current <code>ElementPath</code> 035 * to process 036 */ 037 public void onEnd(ElementPath elementPath); 038 039} 040 041 042 043 044/* 045 * Redistribution and use of this software and associated documentation 046 * ("Software"), with or without modification, are permitted provided 047 * that the following conditions are met: 048 * 049 * 1. Redistributions of source code must retain copyright 050 * statements and notices. Redistributions must also contain a 051 * copy of this document. 052 * 053 * 2. Redistributions in binary form must reproduce the 054 * above copyright notice, this list of conditions and the 055 * following disclaimer in the documentation and/or other 056 * materials provided with the distribution. 057 * 058 * 3. The name "DOM4J" must not be used to endorse or promote 059 * products derived from this Software without prior written 060 * permission of MetaStuff, Ltd. For written permission, 061 * please contact dom4j-info@metastuff.com. 062 * 063 * 4. Products derived from this Software may not be called "DOM4J" 064 * nor may "DOM4J" appear in their names without prior written 065 * permission of MetaStuff, Ltd. DOM4J is a registered 066 * trademark of MetaStuff, Ltd. 067 * 068 * 5. Due credit should be given to the DOM4J Project 069 * (http://dom4j.org/). 070 * 071 * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS 072 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT 073 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 074 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 075 * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 076 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 077 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 078 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 079 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 080 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 081 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 082 * OF THE POSSIBILITY OF SUCH DAMAGE. 083 * 084 * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. 085 * 086 * $Id: ElementHandler.java,v 1.3 2001/05/18 19:18:53 drwhite Exp $ 087 */