GXPARSE hosted by SourceForge.net Logo

ca.gorman.xml.parse
Interface CurrentElement

All Superinterfaces:
Element
All Known Implementing Classes:
CoroutineElement

public interface CurrentElement
extends Element

Java Element instance that represents the element being parsed, and the top element on the parser element stack.

An Element on the top of stack has a nesting level within the document being parsed, and it has content that must be processed exactly once by either the parseContent method or the skipContent method before the ElementListener.doElement method returns.


Method Summary
 int getDocumentLevel()
           Get the nesting level of this element.
 void parseContent()
           Parse the content of an element (required even if there is no content).
 void skipContent()
           Skip element content (optional implementation), passing only error and warning messages to the application.
 
Methods inherited from interface ca.gorman.xml.parse.Element
equals, getAttribute, getAttributes, getChildCount, getParent, getQName, getRepeatCount, getSiblingCount, hasAncestor, hashCode, hasParent
 

Method Detail

getDocumentLevel

int getDocumentLevel()

Get the nesting level of this element.

Top element (the document element) is level 1, child elements have higher numbers.


parseContent

void parseContent()
                  throws ListenerException,
                         IOException

Parse the content of an element (required even if there is no content).

This method causes the parser to continue operation, and does not return until the end of the element.

Throws:
ReparsedContentException - if this method or the skipContent method has already been invoked from within the same invocation of the element handler.
ListenerException
IOException

skipContent

void skipContent()
                 throws ListenerException,
                        IOException

Skip element content (optional implementation), passing only error and warning messages to the application.

Throws:
ReparsedContentException - if this method or the parseContent method has already been invoked from within the same invocation of the element handler.
UnsupportedOperationException - when not implemented
ListenerException
IOException

GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License