Knopflerfish OSGi 3.0.0

org.kxml2.io
Class KXmlParser

java.lang.Object
  extended by org.kxml2.io.KXmlParser
All Implemented Interfaces:
org.xmlpull.v1.XmlPullParser

public class KXmlParser
extends java.lang.Object
implements 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
KXmlParser()
           
 
Method Summary
 void defineEntityReplacementText(java.lang.String entity, java.lang.String value)
           
 int getAttributeCount()
           
 java.lang.String getAttributeName(int index)
           
 java.lang.String getAttributeNamespace(int index)
           
 java.lang.String getAttributePrefix(int index)
           
 java.lang.String getAttributeType(int index)
           
 java.lang.String getAttributeValue(int index)
           
 java.lang.String getAttributeValue(java.lang.String namespace, java.lang.String name)
           
 int getColumnNumber()
           
 int getDepth()
           
 int getEventType()
           
 boolean getFeature(java.lang.String feature)
           
 java.lang.String getInputEncoding()
           
 int getLineNumber()
           
 java.lang.String getName()
           
 java.lang.String getNamespace()
           
 java.lang.String getNamespace(java.lang.String prefix)
           
 int getNamespaceCount(int depth)
           
 java.lang.String getNamespacePrefix(int pos)
           
 java.lang.String getNamespaceUri(int pos)
           
 java.lang.String getPositionDescription()
           
 java.lang.String getPrefix()
           
 java.lang.Object getProperty(java.lang.String property)
           
 java.lang.String getText()
           
 char[] getTextCharacters(int[] poslen)
           
 boolean isAttributeDefault(int index)
           
 boolean isEmptyElementTag()
           
 boolean isWhitespace()
           
 int next()
           
 int nextTag()
           
 java.lang.String nextText()
           
 int nextToken()
           
 void require(int type, java.lang.String namespace, java.lang.String name)
           
 void setFeature(java.lang.String feature, boolean value)
           
 void setInput(java.io.InputStream is, java.lang.String _enc)
           
 void setInput(java.io.Reader reader)
           
 void setProperty(java.lang.String property, java.lang.Object value)
           
 void skipSubTree()
          Skip sub tree that is currently porser positioned on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KXmlParser

public KXmlParser()
Method Detail

setInput

public void setInput(java.io.Reader reader)
              throws org.xmlpull.v1.XmlPullParserException
Specified by:
setInput in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

setInput

public void setInput(java.io.InputStream is,
                     java.lang.String _enc)
              throws org.xmlpull.v1.XmlPullParserException
Specified by:
setInput in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getFeature

public boolean getFeature(java.lang.String feature)
Specified by:
getFeature in interface org.xmlpull.v1.XmlPullParser

getInputEncoding

public java.lang.String getInputEncoding()
Specified by:
getInputEncoding in interface org.xmlpull.v1.XmlPullParser

defineEntityReplacementText

public void defineEntityReplacementText(java.lang.String entity,
                                        java.lang.String value)
                                 throws org.xmlpull.v1.XmlPullParserException
Specified by:
defineEntityReplacementText in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getProperty

public java.lang.Object getProperty(java.lang.String property)
Specified by:
getProperty in interface org.xmlpull.v1.XmlPullParser

getNamespaceCount

public int getNamespaceCount(int depth)
Specified by:
getNamespaceCount in interface org.xmlpull.v1.XmlPullParser

getNamespacePrefix

public java.lang.String getNamespacePrefix(int pos)
Specified by:
getNamespacePrefix in interface org.xmlpull.v1.XmlPullParser

getNamespaceUri

public java.lang.String getNamespaceUri(int pos)
Specified by:
getNamespaceUri in interface org.xmlpull.v1.XmlPullParser

getNamespace

public java.lang.String getNamespace(java.lang.String prefix)
Specified by:
getNamespace in interface org.xmlpull.v1.XmlPullParser

getDepth

public int getDepth()
Specified by:
getDepth in interface org.xmlpull.v1.XmlPullParser

getPositionDescription

public java.lang.String getPositionDescription()
Specified by:
getPositionDescription in interface org.xmlpull.v1.XmlPullParser

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface org.xmlpull.v1.XmlPullParser

getColumnNumber

public int getColumnNumber()
Specified by:
getColumnNumber in interface org.xmlpull.v1.XmlPullParser

isWhitespace

public boolean isWhitespace()
                     throws org.xmlpull.v1.XmlPullParserException
Specified by:
isWhitespace in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getText

public java.lang.String getText()
Specified by:
getText in interface org.xmlpull.v1.XmlPullParser

getTextCharacters

public char[] getTextCharacters(int[] poslen)
Specified by:
getTextCharacters in interface org.xmlpull.v1.XmlPullParser

getNamespace

public java.lang.String getNamespace()
Specified by:
getNamespace in interface org.xmlpull.v1.XmlPullParser

getName

public java.lang.String getName()
Specified by:
getName in interface org.xmlpull.v1.XmlPullParser

getPrefix

public java.lang.String getPrefix()
Specified by:
getPrefix in interface org.xmlpull.v1.XmlPullParser

isEmptyElementTag

public boolean isEmptyElementTag()
                          throws org.xmlpull.v1.XmlPullParserException
Specified by:
isEmptyElementTag in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getAttributeCount

public int getAttributeCount()
Specified by:
getAttributeCount in interface org.xmlpull.v1.XmlPullParser

getAttributeType

public java.lang.String getAttributeType(int index)
Specified by:
getAttributeType in interface org.xmlpull.v1.XmlPullParser

isAttributeDefault

public boolean isAttributeDefault(int index)
Specified by:
isAttributeDefault in interface org.xmlpull.v1.XmlPullParser

getAttributeNamespace

public java.lang.String getAttributeNamespace(int index)
Specified by:
getAttributeNamespace in interface org.xmlpull.v1.XmlPullParser

getAttributeName

public java.lang.String getAttributeName(int index)
Specified by:
getAttributeName in interface org.xmlpull.v1.XmlPullParser

getAttributePrefix

public java.lang.String getAttributePrefix(int index)
Specified by:
getAttributePrefix in interface org.xmlpull.v1.XmlPullParser

getAttributeValue

public java.lang.String getAttributeValue(int index)
Specified by:
getAttributeValue in interface org.xmlpull.v1.XmlPullParser

getAttributeValue

public java.lang.String getAttributeValue(java.lang.String namespace,
                                          java.lang.String name)
Specified by:
getAttributeValue in interface org.xmlpull.v1.XmlPullParser

getEventType

public int getEventType()
                 throws org.xmlpull.v1.XmlPullParserException
Specified by:
getEventType in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

next

public int next()
         throws org.xmlpull.v1.XmlPullParserException,
                java.io.IOException
Specified by:
next in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
java.io.IOException

nextToken

public int nextToken()
              throws org.xmlpull.v1.XmlPullParserException,
                     java.io.IOException
Specified by:
nextToken in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
java.io.IOException

nextTag

public int nextTag()
            throws org.xmlpull.v1.XmlPullParserException,
                   java.io.IOException
Specified by:
nextTag in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
java.io.IOException

require

public void require(int type,
                    java.lang.String namespace,
                    java.lang.String name)
             throws org.xmlpull.v1.XmlPullParserException,
                    java.io.IOException
Specified by:
require in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
java.io.IOException

nextText

public java.lang.String nextText()
                          throws org.xmlpull.v1.XmlPullParserException,
                                 java.io.IOException
Specified by:
nextText in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
java.io.IOException

setFeature

public void setFeature(java.lang.String feature,
                       boolean value)
                throws org.xmlpull.v1.XmlPullParserException
Specified by:
setFeature in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

setProperty

public void setProperty(java.lang.String property,
                        java.lang.Object value)
                 throws org.xmlpull.v1.XmlPullParserException
Specified by:
setProperty in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

skipSubTree

public void skipSubTree()
                 throws org.xmlpull.v1.XmlPullParserException,
                        java.io.IOException
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.XmlPullParserException
java.io.IOException

Knopflerfish OSGi 3.0.0