|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kxml.parser.ParseEvent
Abstract superclass for all pull parser events. In order to avoid some typecasts, this class already provides most of the content access methods filled in the specialized subclasses.
Constructor Summary | |
ParseEvent(int type,
java.lang.String text)
|
Method Summary | |
Attribute |
getAttribute(int index)
In the event type is START_TAG, this method returns the attribute at the given index position. |
Attribute |
getAttribute(java.lang.String name)
returns the local attribute with the given name. |
Attribute |
getAttribute(java.lang.String namespace,
java.lang.String name)
returns the local attribute with the given qualified name. |
int |
getAttributeCount()
If the event type is START_TAG, the number of attributes is returned. |
java.util.Vector |
getAttributes()
If the event type is START_TAG, the attribute Vector (null if no attributes) is returned. |
int |
getLineNumber()
returns the line number of the event |
java.lang.String |
getName()
returns the (local) name of the element started if instance of StartTag, null otherwise. |
java.lang.String |
getNamespace()
returns namespace if instance of StartTag, null otherwise. |
java.lang.String |
getText()
If the event type is TEXT, PROCESSING_INSTRUCTION, or DOCTYPE, the corresponding string is returned. |
int |
getType()
returns the event type integer constant assigned to this event. |
java.lang.String |
getValue(java.lang.String attrName)
Returns the value of the attribute with the given name. |
java.lang.String |
getValueDefault(java.lang.String attrName,
java.lang.String deflt)
Returns the given attribute value, or the given default value if the attribute is not existing. |
void |
setLineNumber(int lineNumber)
sets the line number of the event. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ParseEvent(int type, java.lang.String text)
Method Detail |
public int getLineNumber()
public int getType()
public void setLineNumber(int lineNumber)
public Attribute getAttribute(int index)
public Attribute getAttribute(java.lang.String name)
public Attribute getAttribute(java.lang.String namespace, java.lang.String name)
public int getAttributeCount()
public java.util.Vector getAttributes()
public java.lang.String getName()
public java.lang.String getNamespace()
public java.lang.String getValue(java.lang.String attrName)
public java.lang.String getValueDefault(java.lang.String attrName, java.lang.String deflt)
public java.lang.String getText()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |