Package org.kxml2.wap
Class WbxmlParser
java.lang.Object
org.kxml2.wap.WbxmlParser
- All Implemented Interfaces:
org.xmlpull.v1.XmlPullParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Parser 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 TypeMethodDescriptionvoid
defineEntityReplacementText
(String entity, String value) int
getAttributeName
(int index) getAttributeNamespace
(int index) getAttributePrefix
(int index) getAttributeType
(int index) getAttributeValue
(int index) getAttributeValue
(String namespace, String name) int
int
getDepth()
int
boolean
getFeature
(String feature) int
getName()
getNamespace
(String prefix) int
getNamespaceCount
(int depth) getNamespacePrefix
(int pos) getNamespaceUri
(int pos) getProperty
(String property) getText()
char[]
getTextCharacters
(int[] poslen) int
Returns the token ID for start tags or the event type for wap proprietary events such as OPAQUE.boolean
isAttributeDefault
(int index) boolean
boolean
int
next()
int
nextTag()
nextText()
int
parseWapExtension
(int id) Overwrite this method to intercept all wap eventsvoid
readAttr()
void
void
setAttrStartTable
(int page, String[] table) Sets the attribute start Table for a given page.void
setAttrValueTable
(int page, String[] table) Sets the attribute value Table for a given page.void
setFeature
(String feature, boolean value) void
setInput
(InputStream in, String enc) void
void
setProperty
(String property, Object value) void
setTagTable
(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:
getFeature
in interfaceorg.xmlpull.v1.XmlPullParser
-
getInputEncoding
- Specified by:
getInputEncoding
in interfaceorg.xmlpull.v1.XmlPullParser
-
defineEntityReplacementText
public void defineEntityReplacementText(String entity, String value) throws org.xmlpull.v1.XmlPullParserException - Specified by:
defineEntityReplacementText
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
-
getProperty
- Specified by:
getProperty
in interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespaceCount
public int getNamespaceCount(int depth) - Specified by:
getNamespaceCount
in interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespacePrefix
- Specified by:
getNamespacePrefix
in interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespaceUri
- Specified by:
getNamespaceUri
in interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespace
- Specified by:
getNamespace
in interfaceorg.xmlpull.v1.XmlPullParser
-
getDepth
public int getDepth()- Specified by:
getDepth
in interfaceorg.xmlpull.v1.XmlPullParser
-
getPositionDescription
- Specified by:
getPositionDescription
in interfaceorg.xmlpull.v1.XmlPullParser
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumber
in interfaceorg.xmlpull.v1.XmlPullParser
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumber
in interfaceorg.xmlpull.v1.XmlPullParser
-
isWhitespace
public boolean isWhitespace() throws org.xmlpull.v1.XmlPullParserException- Specified by:
isWhitespace
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
-
getText
- Specified by:
getText
in interfaceorg.xmlpull.v1.XmlPullParser
-
getTextCharacters
public char[] getTextCharacters(int[] poslen) - Specified by:
getTextCharacters
in interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespace
- Specified by:
getNamespace
in interfaceorg.xmlpull.v1.XmlPullParser
-
getName
- Specified by:
getName
in interfaceorg.xmlpull.v1.XmlPullParser
-
getPrefix
- Specified by:
getPrefix
in interfaceorg.xmlpull.v1.XmlPullParser
-
isEmptyElementTag
public boolean isEmptyElementTag() throws org.xmlpull.v1.XmlPullParserException- Specified by:
isEmptyElementTag
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
-
getAttributeCount
public int getAttributeCount()- Specified by:
getAttributeCount
in interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeType
- Specified by:
getAttributeType
in interfaceorg.xmlpull.v1.XmlPullParser
-
isAttributeDefault
public boolean isAttributeDefault(int index) - Specified by:
isAttributeDefault
in interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeNamespace
- Specified by:
getAttributeNamespace
in interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeName
- Specified by:
getAttributeName
in interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributePrefix
- Specified by:
getAttributePrefix
in interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeValue
- Specified by:
getAttributeValue
in interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeValue
- Specified by:
getAttributeValue
in interfaceorg.xmlpull.v1.XmlPullParser
-
getEventType
public int getEventType() throws org.xmlpull.v1.XmlPullParserException- Specified by:
getEventType
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
-
next
- Specified by:
next
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
IOException
-
nextToken
- Specified by:
nextToken
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
IOException
-
nextTag
- Specified by:
nextTag
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
IOException
-
nextText
- Specified by:
nextText
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
IOException
-
require
public void require(int type, String namespace, String name) throws org.xmlpull.v1.XmlPullParserException, IOException - Specified by:
require
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
IOException
-
setInput
- Specified by:
setInput
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
-
setInput
- Specified by:
setInput
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
-
setFeature
- Specified by:
setFeature
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
-
setProperty
- Specified by:
setProperty
in interfaceorg.xmlpull.v1.XmlPullParser
- Throws:
org.xmlpull.v1.XmlPullParserException
-
parseWapExtension
Overwrite this method to intercept all wap events- Throws:
IOException
org.xmlpull.v1.XmlPullParserException
-
readAttr
- Throws:
IOException
org.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
-