org.cyberneko.pull.event
Class ElementEvent

java.lang.Object
  extended byorg.cyberneko.pull.XMLEvent
      extended byorg.cyberneko.pull.event.BoundedEvent
          extended byorg.cyberneko.pull.event.ElementEvent

public class ElementEvent
extends BoundedEvent

An element event. This event communicates both the start element and end element events. In addition, this event allows the application to query whether the element tag represented by this event was empty. In other words, whether the tag appears as "<root></root>" or "<root/>".

Version:
$Id: ElementEvent.java,v 1.2 2003/01/28 20:00:30 andyc Exp $
Author:
Andy Clark

Field Summary
 org.apache.xerces.xni.XMLAttributes attributes
          The attributes for the start element.
 org.apache.xerces.xni.QName element
          The qualified name of the element.
 boolean empty
          True if this element is an empty element, for example <root/>.
 
Fields inherited from class org.cyberneko.pull.event.BoundedEvent
start
 
Fields inherited from class org.cyberneko.pull.XMLEvent
augs, CDATA, CHARACTERS, COMMENT, DOCTYPE_DECL, DOCUMENT, ELEMENT, GENERAL_ENTITY, next, PREFIX_MAPPING, PROCESSING_INSTRUCTION, TEXT_DECL, type
 
Constructor Summary
ElementEvent()
          Default constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

public org.apache.xerces.xni.QName element
The qualified name of the element.


attributes

public org.apache.xerces.xni.XMLAttributes attributes
The attributes for the start element. This value will be null for end elements.


empty

public boolean empty
True if this element is an empty element, for example <root/>.

Note: The pull parser will always report both a start and end element event for empty elements. This allows applications to deal with elements in a consistent manner. However, both the start and end element event objects of an empty element will have the empty field set to true.

Constructor Detail

ElementEvent

public ElementEvent()
Default constructor.



(C) Copyright 2002-2004, Andy Clark. All rights reserved.