com.simonstl.midp.tam
Interface TamParser

All Known Implementing Classes:
TAMParserImpl

public interface TamParser

The API used to set up and start a TAM-based parser. Based loosely on the SAX2 XMLReader interface.

Author:
simonstl

Method Summary
 boolean getFeature(java.lang.String name)
          Works like the SAX2 getFeature() method.
 TamHandler getHandler()
          Lets you retrieve the handler assigned to a particular parser.
 void parse(java.io.InputStream in)
          Works the same as the SAX2 parse(InputStream in) method.
 void reset()
          Clears entity and namespace state from prior operations.
 void setEntity(java.lang.String name, java.lang.String value)
          Allows applications to set additional entities for the parser to resolve beyond the built-in set.
 void setFeature(java.lang.String name, boolean value)
          Works like the SAX2 setFeature() method.
 void setHandler(TamHandler handler)
          Lets you set the handler assigned to a particular parser.
 void setNamespace(java.lang.String prefix, java.lang.String nsURI)
          Sets a namespace which will be used in processing.
 

Method Detail

setHandler

public void setHandler(TamHandler handler)
Lets you set the handler assigned to a particular parser.

getHandler

public TamHandler getHandler()
Lets you retrieve the handler assigned to a particular parser.

reset

public void reset()
           throws TAMException
Clears entity and namespace state from prior operations.

parse

public void parse(java.io.InputStream in)
           throws TAMException
Works the same as the SAX2 parse(InputStream in) method. Because J2ME devices vary widely, there is no support in TAM for parse(String systemID)

setFeature

public void setFeature(java.lang.String name,
                       boolean value)
                throws TAMException
Works like the SAX2 setFeature() method. TAM parsers are not required to support any particular features. setFeature() should generally be used before parsing. SAX2 properties are not supported.

getFeature

public boolean getFeature(java.lang.String name)
                   throws TAMException
Works like the SAX2 getFeature() method. TAM parsers are not required to support any particular features. getFeature() may be used at any time. SAX2 properties are not supported.

setEntity

public void setEntity(java.lang.String name,
                      java.lang.String value)
               throws TAMException
Allows applications to set additional entities for the parser to resolve beyond the built-in set. You cannot override the built-in entities. To "undeclare" an entity, set its value to null.

setNamespace

public void setNamespace(java.lang.String prefix,
                         java.lang.String nsURI)
                  throws TAMException
Sets a namespace which will be used in processing. This takes effect as if it had been declared in the current level of document processing. Most typically, applications should set this before the root element is processed and avoid more complex efforts to play with namespaces in particular scopes. Once an element has been reported, it's not like you can go back and replay the reporting event.