public class MXParser extends Object implements 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 and Description |
---|
MXParser() |
Modifier and Type | Method and Description |
---|---|
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.
|
public void setFeature(String name, boolean state) throws org.xmlpull.v1.XmlPullParserException
setFeature
in interface org.xmlpull.v1.XmlPullParser
name
- a Stringstate
- a booleanorg.xmlpull.v1.XmlPullParserException
public boolean getFeature(String name)
getFeature
in interface org.xmlpull.v1.XmlPullParser
public void setProperty(String name, Object value) throws org.xmlpull.v1.XmlPullParserException
setProperty
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public Object getProperty(String name)
getProperty
in interface org.xmlpull.v1.XmlPullParser
public void setInput(Reader in) throws org.xmlpull.v1.XmlPullParserException
setInput
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public void setInput(InputStream inputStream, String inputEncoding) throws org.xmlpull.v1.XmlPullParserException
setInput
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public String getInputEncoding()
getInputEncoding
in interface org.xmlpull.v1.XmlPullParser
public void defineEntityReplacementText(String entityName, String replacementText) throws org.xmlpull.v1.XmlPullParserException
defineEntityReplacementText
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public int getNamespaceCount(int depth) throws org.xmlpull.v1.XmlPullParserException
getNamespaceCount
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public String getNamespacePrefix(int pos) throws org.xmlpull.v1.XmlPullParserException
getNamespacePrefix
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public String getNamespaceUri(int pos) throws org.xmlpull.v1.XmlPullParserException
getNamespaceUri
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public String getNamespace(String prefix)
getNamespace
in interface org.xmlpull.v1.XmlPullParser
public int getDepth()
getDepth
in interface org.xmlpull.v1.XmlPullParser
public String getPositionDescription()
getPositionDescription
in interface org.xmlpull.v1.XmlPullParser
public int getLineNumber()
getLineNumber
in interface org.xmlpull.v1.XmlPullParser
public int getColumnNumber()
getColumnNumber
in interface org.xmlpull.v1.XmlPullParser
public boolean isWhitespace() throws org.xmlpull.v1.XmlPullParserException
isWhitespace
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public String getText()
getText
in interface org.xmlpull.v1.XmlPullParser
public char[] getTextCharacters(int[] holderForStartAndLength)
getTextCharacters
in interface org.xmlpull.v1.XmlPullParser
public String getNamespace()
getNamespace
in interface org.xmlpull.v1.XmlPullParser
public String getName()
getName
in interface org.xmlpull.v1.XmlPullParser
public String getPrefix()
getPrefix
in interface org.xmlpull.v1.XmlPullParser
public boolean isEmptyElementTag() throws org.xmlpull.v1.XmlPullParserException
isEmptyElementTag
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public int getAttributeCount()
getAttributeCount
in interface org.xmlpull.v1.XmlPullParser
public String getAttributeNamespace(int index)
getAttributeNamespace
in interface org.xmlpull.v1.XmlPullParser
public String getAttributeName(int index)
getAttributeName
in interface org.xmlpull.v1.XmlPullParser
public String getAttributePrefix(int index)
getAttributePrefix
in interface org.xmlpull.v1.XmlPullParser
public String getAttributeType(int index)
getAttributeType
in interface org.xmlpull.v1.XmlPullParser
public boolean isAttributeDefault(int index)
isAttributeDefault
in interface org.xmlpull.v1.XmlPullParser
public String getAttributeValue(int index)
getAttributeValue
in interface org.xmlpull.v1.XmlPullParser
public String getAttributeValue(String namespace, String name)
getAttributeValue
in interface org.xmlpull.v1.XmlPullParser
public int getEventType() throws org.xmlpull.v1.XmlPullParserException
getEventType
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
public void require(int type, String namespace, String name) throws org.xmlpull.v1.XmlPullParserException, IOException
require
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
IOException
public void skipSubTree() throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserException
IOException
public String nextText() throws org.xmlpull.v1.XmlPullParserException, IOException
nextText
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
IOException
public int nextTag() throws org.xmlpull.v1.XmlPullParserException, IOException
nextTag
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
IOException
public int next() throws org.xmlpull.v1.XmlPullParserException, IOException
next
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
IOException
public int nextToken() throws org.xmlpull.v1.XmlPullParserException, IOException
nextToken
in interface org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
IOException
public int parseEndTag() throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserException
IOException
public int parseStartTag() throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserException
IOException
Copyright © 2020–2023. All rights reserved.