|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.build.doc.XMLParser
public class XMLParser
This class implements a simple XML pull parser. Only a subset of the XML pull parser API is implemented.
Field Summary | |
---|---|
static int |
CHARACTERS
This event type means text has been read. |
static int |
COMMENT
This event type means a comment has been read. |
static int |
DTD
This event type means a DTD element has been read. |
static int |
END_DOCUMENT
This event type means the end of the document has been reached. |
static int |
END_ELEMENT
This event type means an end element has been read. |
static int |
ERROR
This event type means an error occurred. |
static int |
PROCESSING_INSTRUCTION
This event type means a processing instruction has been read. |
static int |
START_DOCUMENT
This event type is used before reading. |
static int |
START_ELEMENT
This event type means a start element has been read. |
Constructor Summary | |
---|---|
XMLParser(java.lang.String xml)
Construct a new XML parser. |
Method Summary | |
---|---|
int |
getAttributeCount()
Get the number of attributes. |
java.lang.String |
getAttributeLocalName(int index)
Get the local name of the attribute. |
java.lang.String |
getAttributeName(int index)
Get the full name of the attribute. |
java.lang.String |
getAttributePrefix(int index)
Get the prefix of the attribute. |
java.lang.String |
getAttributeValue(int index)
Get the value of this attribute. |
java.lang.String |
getAttributeValue(java.lang.String namespaceURI,
java.lang.String name)
Get the value of this attribute. |
int |
getEventType()
Get the event type of the current token. |
java.lang.String |
getLocalName()
Get the local name of the current start or end element. |
java.lang.String |
getName()
Get the full name of the current start or end element. |
int |
getPos()
Get the current character position in the XML document. |
java.lang.String |
getPrefix()
Get the prefix of the current start or end element. |
java.lang.String |
getRemaining()
Get the remaining XML text of the document. |
java.lang.String |
getText()
Get the current text. |
java.lang.String |
getToken()
Get the current token text. |
boolean |
hasNext()
Check if there are more tags to read. |
boolean |
isWhiteSpace()
Check if the current character tag only contains spaces or other non-printable characters. |
int |
next()
Read the next tag. |
int |
nextTag()
Read the next start, end, or character tag. |
void |
setHTML(boolean html)
Enable or disable HTML processing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ERROR
public static final int START_ELEMENT
public static final int END_ELEMENT
public static final int PROCESSING_INSTRUCTION
public static final int CHARACTERS
public static final int COMMENT
public static final int START_DOCUMENT
public static final int END_DOCUMENT
public static final int DTD
Constructor Detail |
---|
public XMLParser(java.lang.String xml)
xml
- the documentMethod Detail |
---|
public void setHTML(boolean html)
html
- true if HTML processing is enabled.public boolean hasNext()
public int next()
public int nextTag()
public int getEventType()
public java.lang.String getText()
public java.lang.String getToken()
public int getAttributeCount()
public java.lang.String getAttributePrefix(int index)
index
- the index of the attribute (starting with 0)
public java.lang.String getAttributeLocalName(int index)
index
- the index of the attribute (starting with 0)
public java.lang.String getAttributeName(int index)
index
- the index of the attribute (starting with 0)
public java.lang.String getAttributeValue(int index)
index
- the index of the attribute (starting with 0)
public java.lang.String getAttributeValue(java.lang.String namespaceURI, java.lang.String name)
namespaceURI
- the namespace URI (currently ignored)name
- the local name of the attribute
public java.lang.String getName()
public java.lang.String getLocalName()
public java.lang.String getPrefix()
public boolean isWhiteSpace()
public java.lang.String getRemaining()
public int getPos()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |