public class Element extends Object
RootElement
Modifier and Type | Method and Description |
---|---|
Element |
getChild(String localName)
Gets the child element with the given name.
|
Element |
getChild(String uri,
String localName)
Gets the child element with the given name.
|
Element |
requireChild(String localName)
Gets the child element with the given name.
|
Element |
requireChild(String uri,
String localName)
Gets the child element with the given name.
|
void |
setElementListener(ElementListener elementListener)
Sets start and end element listeners at the same time.
|
void |
setEndElementListener(EndElementListener endElementListener)
Sets a listener for the end of this element.
|
void |
setEndTextElementListener(EndTextElementListener endTextElementListener)
Sets a listener for the end of this text element.
|
void |
setStartElementListener(StartElementListener startElementListener)
Sets a listener for the start of this element.
|
void |
setTextElementListener(TextElementListener elementListener)
Sets start and end text element listeners at the same time.
|
String |
toString()
Returns a string representation of the object.
|
public Element getChild(String localName)
public Element getChild(String uri, String localName)
public Element requireChild(String localName)
SAXException
at parsing
time if the specified child is missing. This helps you ensure that your
listeners are called.public Element requireChild(String uri, String localName)
SAXException
at parsing time if the specified child
is missing. This helps you ensure that your listeners are called.public void setElementListener(ElementListener elementListener)
public void setTextElementListener(TextElementListener elementListener)
public void setStartElementListener(StartElementListener startElementListener)
public void setEndElementListener(EndElementListener endElementListener)
public void setEndTextElementListener(EndTextElementListener endTextElementListener)
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())