Class KXmlParser
java.lang.Object
org.kxml2.io.KXmlParser
- All Implemented Interfaces:
org.xmlpull.v1.XmlPullParser
A simple, pull based XML parser. This classe replaces the kXML 1
XmlParser class and the corresponding event classes.
-
Field Summary
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) booleanisAttributeDefault(int index) booleanbooleanintnext()intnextTag()nextText()intvoidvoidsetFeature(String feature, boolean value) voidsetInput(InputStream is, String _enc) voidvoidsetProperty(String property, Object value) voidSkip sub tree that is currently porser positioned on.
-
Constructor Details
-
KXmlParser
public KXmlParser()
-
-
Method Details
-
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
-
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
-
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
-
nextText
- Specified by:
nextTextin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
setFeature
- Specified by:
setFeaturein interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
setProperty
-
skipSubTree
Skip sub tree that is currently porser positioned on.
NOTE: parser must be on START_TAG and when funtion returns parser will be positioned on corresponding END_TAG.- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-