io.github.xstream.mxparser

## Class MXParser

- java.lang.Object
- - io.github.xstream.mxparser.MXParser

All Implemented Interfaces:
  org.xmlpull.v1.XmlPullParser

    public class MXParser
    extends Object
    implements org.xmlpull.v1.XmlPullParser

Absolutely minimal implementation of XMLPULL V1 API

Author:
  Aleksander Slominski

### 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
Constructor and Description
`MXParser()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `defineEntityReplacementText(String entityName, String replacementText)`
`int` `getAttributeCount()`
`String` `getAttributeName(int index)`
`String` `getAttributeNamespace(int index)`
`String` `getAttributePrefix(int index)`
`String` `getAttributeType(int index)`
`String` `getAttributeValue(int index)`
`String` `getAttributeValue(String namespace, String name)`
`int` `getColumnNumber()`
`int` `getDepth()`
`int` `getEventType()`
`boolean` `getFeature(String name)` Unknown properties are always returned as false
`String` `getInputEncoding()`
`int` `getLineNumber()`
`String` `getName()`
`String` `getNamespace()`
`String` `getNamespace(String prefix)`
`int` `getNamespaceCount(int depth)`
`String` `getNamespacePrefix(int pos)`
`String` `getNamespaceUri(int pos)`
`String` `getPositionDescription()` Return string describing current position of parsers as text 'STATE [seen %s...] @line:column'.
`String` `getPrefix()`
`Object` `getProperty(String name)`
`String` `getText()`
`char[]` `getTextCharacters(int[] holderForStartAndLength)`
`boolean` `isAttributeDefault(int index)`
`boolean` `isEmptyElementTag()`
`boolean` `isWhitespace()`
`int` `next()`
`int` `nextTag()`
`String` `nextText()`
`int` `nextToken()`
`int` `parseEndTag()`
`int` `parseStartTag()`
`void` `require(int type, String namespace, String name)`
`void` `setFeature(String name, boolean state)` Method setFeature
`void` `setInput(InputStream inputStream, String inputEncoding)`
`void` `setInput(Reader in)`
`void` `setProperty(String name, Object value)`
`void` `skipSubTree()` Skip sub tree that is currently parser positioned on.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MXParser

    public MXParser()

### Method Detail

#### setFeature

    public void setFeature(String name,
                           boolean state)
                    throws org.xmlpull.v1.XmlPullParserException

Method setFeature

Specified by:
  `setFeature` in interface `org.xmlpull.v1.XmlPullParser`
Parameters:
  `name` - a String
  `state` - a boolean
Throws:
  `org.xmlpull.v1.XmlPullParserException`

#### getFeature

    public boolean getFeature(String name)

Unknown properties are always returned as false

Specified by:
  `getFeature` in interface `org.xmlpull.v1.XmlPullParser`

#### setProperty

    public void setProperty(String name,
                            Object value)
                     throws org.xmlpull.v1.XmlPullParserException

Specified by:
  `setProperty` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`

#### getProperty

    public Object getProperty(String name)

Specified by:
  `getProperty` in interface `org.xmlpull.v1.XmlPullParser`

#### setInput

    public void setInput(Reader in)
                  throws org.xmlpull.v1.XmlPullParserException

Specified by:
  `setInput` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`

#### setInput

    public void setInput(InputStream inputStream,
                         String inputEncoding)
                  throws org.xmlpull.v1.XmlPullParserException

Specified by:
  `setInput` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`

#### getInputEncoding

    public String getInputEncoding()

Specified by:
  `getInputEncoding` in interface `org.xmlpull.v1.XmlPullParser`

#### defineEntityReplacementText

    public void defineEntityReplacementText(String entityName,
                                            String replacementText)
                                     throws org.xmlpull.v1.XmlPullParserException

Specified by:
  `defineEntityReplacementText` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`

#### getNamespaceCount

    public int getNamespaceCount(int depth)
                          throws org.xmlpull.v1.XmlPullParserException

Specified by:
  `getNamespaceCount` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`

#### getNamespacePrefix

    public String getNamespacePrefix(int pos)
                              throws org.xmlpull.v1.XmlPullParserException

Specified by:
  `getNamespacePrefix` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`

#### getNamespaceUri

    public String getNamespaceUri(int pos)
                           throws org.xmlpull.v1.XmlPullParserException

Specified by:
  `getNamespaceUri` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`

#### getNamespace

    public String getNamespace(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 String getPositionDescription()

Return string describing current position of parsers as text 'STATE [seen %s...] @line:column'.

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 String getText()

Specified by:
  `getText` in interface `org.xmlpull.v1.XmlPullParser`

#### getTextCharacters

    public char[] getTextCharacters(int[] holderForStartAndLength)

Specified by:
  `getTextCharacters` in interface `org.xmlpull.v1.XmlPullParser`

#### getNamespace

    public String getNamespace()

Specified by:
  `getNamespace` in interface `org.xmlpull.v1.XmlPullParser`

#### getName

    public String getName()

Specified by:
  `getName` in interface `org.xmlpull.v1.XmlPullParser`

#### getPrefix

    public 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`

#### getAttributeNamespace

    public String getAttributeNamespace(int index)

Specified by:
  `getAttributeNamespace` in interface `org.xmlpull.v1.XmlPullParser`

#### getAttributeName

    public String getAttributeName(int index)

Specified by:
  `getAttributeName` in interface `org.xmlpull.v1.XmlPullParser`

#### getAttributePrefix

    public String getAttributePrefix(int index)

Specified by:
  `getAttributePrefix` in interface `org.xmlpull.v1.XmlPullParser`

#### getAttributeType

    public 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`

#### getAttributeValue

    public String getAttributeValue(int index)

Specified by:
  `getAttributeValue` in interface `org.xmlpull.v1.XmlPullParser`

#### getAttributeValue

    public String getAttributeValue(String namespace,
                                    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`

#### require

    public void require(int type,
                        String namespace,
                        String name)
                 throws org.xmlpull.v1.XmlPullParserException,
                        IOException

Specified by:
  `require` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`
  `IOException`

#### skipSubTree

    public void skipSubTree()
                     throws org.xmlpull.v1.XmlPullParserException,
                            IOException

Skip sub tree that is currently parser positioned on.
NOTE: parser must be on START_TAG and when function returns parser will be positioned on corresponding END_TAG

Throws:
  `org.xmlpull.v1.XmlPullParserException`
  `IOException`

#### nextText

    public String nextText()
                    throws org.xmlpull.v1.XmlPullParserException,
                           IOException

Specified by:
  `nextText` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`
  `IOException`

#### nextTag

    public int nextTag()
                throws org.xmlpull.v1.XmlPullParserException,
                       IOException

Specified by:
  `nextTag` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`
  `IOException`

#### next

    public int next()
             throws org.xmlpull.v1.XmlPullParserException,
                    IOException

Specified by:
  `next` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`
  `IOException`

#### nextToken

    public int nextToken()
                  throws org.xmlpull.v1.XmlPullParserException,
                         IOException

Specified by:
  `nextToken` in interface `org.xmlpull.v1.XmlPullParser`
Throws:
  `org.xmlpull.v1.XmlPullParserException`
  `IOException`

#### parseEndTag

    public int parseEndTag()
                    throws org.xmlpull.v1.XmlPullParserException,
                           IOException

Throws:
  `org.xmlpull.v1.XmlPullParserException`
  `IOException`

#### parseStartTag

    public int parseStartTag()
                      throws org.xmlpull.v1.XmlPullParserException,
                             IOException

Throws:
  `org.xmlpull.v1.XmlPullParserException`
  `IOException`