com.smallx.xml.infoset
Interface ItemSource

All Known Implementing Classes:
EmptySource

public interface ItemSource


Method Summary
 void copyTo(ItemDestination dest)
           
 void flush(boolean all)
          Flushs the items from the source.
 Item receive()
          Called when a infoset item is generated by a source.
 Element seek(Name name)
          Seeks to a particular element at the current level.
 Item seekByType(byte type)
          The type to seek to (e.g.
 

Method Detail

receive

public Item receive()
             throws XMLException
Called when a infoset item is generated by a source.

Returns:
A boolean value indicating that addition items are wanted by the implementing object.
Throws:
XMLException

flush

public void flush(boolean all)
           throws XMLException
Flushs the items from the source.

Parameters:
all - If true, all the items to the end of the document will be flushed. Otherwise, just the current level's children will be flushed.
Throws:
XMLException

seek

public Element seek(Name name)
             throws XMLException
Seeks to a particular element at the current level.

Parameters:
name - The name of the element.
Throws:
XMLException

seekByType

public Item seekByType(byte type)
                throws XMLException
The type to seek to (e.g. Element.TYPE).

Parameters:
type - The type code to use for the seek.
Returns:
An item or null for not found.
Throws:
XMLException - Thrown when there is an implementation error.

copyTo

public void copyTo(ItemDestination dest)
            throws XMLException
Throws:
XMLException