Element
open class Element
kotlin.Any | |
↳ | android.sax.Element |
An XML element. Provides access to child elements and hooks to listen for events related to this element.
Summary
Public methods | |
---|---|
open Element! |
Gets the child element with the given name. |
open Element! |
Gets the child element with the given name. |
open Element! |
requireChild(localName: String!) Gets the child element with the given name. |
open Element! |
requireChild(uri: String!, localName: String!) Gets the child element with the given name. |
open Unit |
setElementListener(elementListener: ElementListener!) Sets start and end element listeners at the same time. |
open Unit |
setEndElementListener(endElementListener: EndElementListener!) Sets a listener for the end of this element. |
open Unit |
setEndTextElementListener(endTextElementListener: EndTextElementListener!) Sets a listener for the end of this text element. |
open Unit |
setStartElementListener(startElementListener: StartElementListener!) Sets a listener for the start of this element. |
open Unit |
setTextElementListener(elementListener: TextElementListener!) Sets start and end text element listeners at the same time. |
open String |
toString() |
Public methods
getChild
open fun getChild(localName: String!): Element!
Gets the child element with the given name. Uses an empty string as the namespace.
getChild
open fun getChild(
uri: String!,
localName: String!
): Element!
Gets the child element with the given name.
requireChild
open fun requireChild(localName: String!): Element!
Gets the child element with the given name. Uses an empty string as the namespace. We will throw a org.xml.sax.SAXException
at parsing time if the specified child is missing. This helps you ensure that your listeners are called.
requireChild
open fun requireChild(
uri: String!,
localName: String!
): Element!
Gets the child element with the given name. We will throw a org.xml.sax.SAXException
at parsing time if the specified child is missing. This helps you ensure that your listeners are called.
setElementListener
open fun setElementListener(elementListener: ElementListener!): Unit
Sets start and end element listeners at the same time.
setEndElementListener
open fun setEndElementListener(endElementListener: EndElementListener!): Unit
Sets a listener for the end of this element.
setEndTextElementListener
open fun setEndTextElementListener(endTextElementListener: EndTextElementListener!): Unit
Sets a listener for the end of this text element.
setStartElementListener
open fun setStartElementListener(startElementListener: StartElementListener!): Unit
Sets a listener for the start of this element.
setTextElementListener
open fun setTextElementListener(elementListener: TextElementListener!): Unit
Sets start and end text element listeners at the same time.
toString
open fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |