1 /*
2 * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
3 *
4 * This software is open source.
5 * See the bottom of this file for the licence.
6 *
7 * $Id: ElementHandler.java,v 1.6 2004/06/25 08:03:33 maartenc Exp $
8 */
9
10 package org.dom4j;
11
12 /*** <p><code>ElementHandler</code> interface defines a handler of
13 * <code>Element</code> objects.
14 * It is used primarily in event based processing models such as for
15 * processing large XML documents as they are being parsed rather than
16 * waiting until the whole document is parsed.</p>
17 *
18 * @author <a href="mailto:james.strachan@metastuff.com">James Strachan</a>
19 * @version $Revision: 1.6 $
20 */
21 public interface ElementHandler {
22
23 /*** Called by an event based processor when an elements openning
24 * tag is encountered.
25 *
26 * @param elementPath is the current <code>ElementPath</code>
27 * to process
28 */
29 public void onStart(ElementPath elementPath);
30
31 /*** Called by an event based processor when an elements closing
32 * tag is encountered.
33 *
34 * @param elementPath is the current <code>ElementPath</code>
35 * to process
36 */
37 public void onEnd(ElementPath elementPath);
38
39 }
40
41
42
43
44 /*
45 * Redistribution and use of this software and associated documentation
46 * ("Software"), with or without modification, are permitted provided
47 * that the following conditions are met:
48 *
49 * 1. Redistributions of source code must retain copyright
50 * statements and notices. Redistributions must also contain a
51 * copy of this document.
52 *
53 * 2. Redistributions in binary form must reproduce the
54 * above copyright notice, this list of conditions and the
55 * following disclaimer in the documentation and/or other
56 * materials provided with the distribution.
57 *
58 * 3. The name "DOM4J" must not be used to endorse or promote
59 * products derived from this Software without prior written
60 * permission of MetaStuff, Ltd. For written permission,
61 * please contact dom4j-info@metastuff.com.
62 *
63 * 4. Products derived from this Software may not be called "DOM4J"
64 * nor may "DOM4J" appear in their names without prior written
65 * permission of MetaStuff, Ltd. DOM4J is a registered
66 * trademark of MetaStuff, Ltd.
67 *
68 * 5. Due credit should be given to the DOM4J Project -
69 * http://www.dom4j.org
70 *
71 * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
72 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
73 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
74 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
75 * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
76 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
77 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
78 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
79 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
80 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
81 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
82 * OF THE POSSIBILITY OF SUCH DAMAGE.
83 *
84 * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
85 *
86 * $Id: ElementHandler.java,v 1.6 2004/06/25 08:03:33 maartenc Exp $
87 */