Class WbxmlParser
java.lang.Object
org.kxml2.wap.WbxmlParser
- All Implemented Interfaces:
org.xmlpull.v1.XmlPullParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intParser event type for Wbxml-specific events.Fields inherited from interface org.xmlpull.v1.XmlPullParser
CDSECT, COMMENT, DOCDECL, END_DOCUMENT, END_TAG, ENTITY_REF, FEATURE_PROCESS_DOCDECL, FEATURE_PROCESS_NAMESPACES, FEATURE_REPORT_NAMESPACE_ATTRIBUTES, FEATURE_VALIDATION, IGNORABLE_WHITESPACE, NO_NAMESPACE, PROCESSING_INSTRUCTION, START_DOCUMENT, START_TAG, TEXT, TYPES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddefineEntityReplacementText(String entity, String value) intgetAttributeName(int index) getAttributeNamespace(int index) getAttributePrefix(int index) getAttributeType(int index) getAttributeValue(int index) getAttributeValue(String namespace, String name) intintgetDepth()intbooleangetFeature(String feature) intgetName()getNamespace(String prefix) intgetNamespaceCount(int depth) getNamespacePrefix(int pos) getNamespaceUri(int pos) getProperty(String property) getText()char[]getTextCharacters(int[] poslen) intReturns the token ID for start tags or the event type for wap proprietary events such as OPAQUE.booleanisAttributeDefault(int index) booleanbooleanintnext()intnextTag()nextText()intparseWapExtension(int id) Overwrite this method to intercept all wap eventsvoidreadAttr()voidvoidsetAttrStartTable(int page, String[] table) Sets the attribute start Table for a given page.voidsetAttrValueTable(int page, String[] table) Sets the attribute value Table for a given page.voidsetFeature(String feature, boolean value) voidsetInput(InputStream in, String enc) voidvoidsetProperty(String property, Object value) voidsetTagTable(int page, String[] table) Sets the tag table for a given page.
-
Field Details
-
WAP_EXTENSION
public static final int WAP_EXTENSIONParser event type for Wbxml-specific events. The Wbxml event code can be accessed with getWapCode()- See Also:
-
-
Constructor Details
-
WbxmlParser
public WbxmlParser()
-
-
Method Details
-
getFeature
- Specified by:
getFeaturein interfaceorg.xmlpull.v1.XmlPullParser
-
getInputEncoding
- Specified by:
getInputEncodingin interfaceorg.xmlpull.v1.XmlPullParser
-
defineEntityReplacementText
-
getProperty
-
getNamespaceCount
public int getNamespaceCount(int depth) - Specified by:
getNamespaceCountin interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespacePrefix
- Specified by:
getNamespacePrefixin interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespaceUri
- Specified by:
getNamespaceUriin interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespace
-
getDepth
public int getDepth()- Specified by:
getDepthin interfaceorg.xmlpull.v1.XmlPullParser
-
getPositionDescription
- Specified by:
getPositionDescriptionin interfaceorg.xmlpull.v1.XmlPullParser
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceorg.xmlpull.v1.XmlPullParser
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumberin interfaceorg.xmlpull.v1.XmlPullParser
-
isWhitespace
public boolean isWhitespace() throws org.xmlpull.v1.XmlPullParserException- Specified by:
isWhitespacein interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
getText
- Specified by:
getTextin interfaceorg.xmlpull.v1.XmlPullParser
-
getTextCharacters
public char[] getTextCharacters(int[] poslen) - Specified by:
getTextCharactersin interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespace
- Specified by:
getNamespacein interfaceorg.xmlpull.v1.XmlPullParser
-
getName
- Specified by:
getNamein interfaceorg.xmlpull.v1.XmlPullParser
-
getPrefix
- Specified by:
getPrefixin interfaceorg.xmlpull.v1.XmlPullParser
-
isEmptyElementTag
public boolean isEmptyElementTag() throws org.xmlpull.v1.XmlPullParserException- Specified by:
isEmptyElementTagin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
getAttributeCount
public int getAttributeCount()- Specified by:
getAttributeCountin interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeType
- Specified by:
getAttributeTypein interfaceorg.xmlpull.v1.XmlPullParser
-
isAttributeDefault
public boolean isAttributeDefault(int index) - Specified by:
isAttributeDefaultin interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeNamespace
- Specified by:
getAttributeNamespacein interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeName
- Specified by:
getAttributeNamein interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributePrefix
- Specified by:
getAttributePrefixin interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeValue
- Specified by:
getAttributeValuein interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeValue
-
getEventType
public int getEventType() throws org.xmlpull.v1.XmlPullParserException- Specified by:
getEventTypein interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
next
- Specified by:
nextin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
nextToken
- Specified by:
nextTokenin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
nextTag
- Specified by:
nextTagin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
nextText
- Specified by:
nextTextin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
require
public void require(int type, String namespace, String name) throws org.xmlpull.v1.XmlPullParserException, IOException - Specified by:
requirein interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
setInput
- Specified by:
setInputin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
setInput
- Specified by:
setInputin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
setFeature
- Specified by:
setFeaturein interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
setProperty
-
parseWapExtension
Overwrite this method to intercept all wap events- Throws:
IOExceptionorg.xmlpull.v1.XmlPullParserException
-
readAttr
- Throws:
IOExceptionorg.xmlpull.v1.XmlPullParserException
-
setTagTable
Sets the tag table for a given page. The first string in the array defines tag 5, the second tag 6 etc. -
setAttrStartTable
Sets the attribute start Table for a given page. The first string in the array defines attribute 5, the second attribute 6 etc. Please use the character '=' (without quote!) as delimiter between the attribute name and the (start of the) value -
setAttrValueTable
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. -
getWapCode
public int getWapCode()Returns the token ID for start tags or the event type for wap proprietary events such as OPAQUE. -
getWapExtensionData
-