de.trantor.wap
Class WbxmlParser

java.lang.Object
  |
  +--de.trantor.wap.WbxmlParser
Direct Known Subclasses:
WmlParser

public class WbxmlParser
extends java.lang.Object

A SAX-based parser for the WAP Binary XML Content Format (WBXML).

This parser does not implement org.xml.sax.Parser in order to avoid some overhead that would probably overfloat the KVM. However, the most important interface, DocumentHandler, is supported.

For full org.sax.Parser compatibility please use this class in conjunciton with the wrapper class SaxWrapper.

Still Todo:


Constructor Summary
WbxmlParser()
           
 
Method Summary
 void parse(java.io.InputStream in)
           
 org.xml.sax.AttributeList readAttr()
           
 void setAttrStartTable(int page, java.lang.String[] attrStartTable)
          Sets the attribute start Table for a given page.
 void setAttrValueTable(int page, java.lang.String[] attrStartTable)
          Sets the attribute value Table for a given page.
 void setDocumentHandler(org.xml.sax.DocumentHandler dh)
          sets DocumentHandler.
 void setTagTable(int page, java.lang.String[] tagTable)
          Sets the tag table for a given page.
 void setWbxmlExtensionHandler(WbxmlExtensionHandler eh)
          registers a handler for Wap XML extensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WbxmlParser

public WbxmlParser()
Method Detail

setTagTable

public void setTagTable(int page,
                        java.lang.String[] tagTable)
Sets the tag table for a given page. The first string in the array defines tag 5, the second tag 6 etc. Currently, only page 0 is supported

setAttrStartTable

public void setAttrStartTable(int page,
                              java.lang.String[] attrStartTable)
Sets the attribute start Table for a given page. The first string in the array defines attribute 5, the second attribute 6 etc. Currently, only page 0 is supported. Please use the character '=' (without quote!) as delimiter between the attribute name and the (start of the) value

setAttrValueTable

public void setAttrValueTable(int page,
                              java.lang.String[] attrStartTable)
Sets the attribute value Table for a given page. The first string in the array defines attribute value 0x85, the second attribute value 0x86 etc. Currently, only page 0 is supported.

setDocumentHandler

public void setDocumentHandler(org.xml.sax.DocumentHandler dh)
sets DocumentHandler. See SAX documentation

setWbxmlExtensionHandler

public void setWbxmlExtensionHandler(WbxmlExtensionHandler eh)
registers a handler for Wap XML extensions

parse

public void parse(java.io.InputStream in)
           throws org.xml.sax.SAXException,
                  java.io.IOException

readAttr

public org.xml.sax.AttributeList readAttr()
                                   throws org.xml.sax.SAXException,
                                          java.io.IOException