com.dyuproject.util.xml
Interface LazyHandler

All Known Implementing Classes:
SimpleHandler

public interface LazyHandler

A handler that can terminate the parsing anytime. Useful when you already got what you wanted from the xml. This saves processing time and memory. Note that the implemention should be the one tracking the stack and the state.

Author:
David Yu
Date created:
Sep 18, 2008

Method Summary
 void attribute(String name, String value)
          Callback after traversing the attributes of an element.
 void characters(char[] data, int start, int length)
          Callback after traversing the text content of an element.
 boolean endElement()
          Callback after traversing the end of xml elements (E.g </foo> or />).
 boolean rootElement(String name, String namespace)
          Callback that gets called only once upon traversing the root xml element.
 boolean startElement(String name, String namespace)
          Callback after traversing the start of xml elements (E.g <foo>).
 

Method Detail

rootElement

boolean rootElement(String name,
                    String namespace)
Callback that gets called only once upon traversing the root xml element.


startElement

boolean startElement(String name,
                     String namespace)
Callback after traversing the start of xml elements (E.g <foo>).


endElement

boolean endElement()
Callback after traversing the end of xml elements (E.g </foo> or />).


attribute

void attribute(String name,
               String value)
Callback after traversing the attributes of an element.


characters

void characters(char[] data,
                int start,
                int length)
Callback after traversing the text content of an element.



Copyright © 2008-2013. All Rights Reserved.