isElement

fun XmlReader.isElement(elementname: QName): Boolean

Determine whether the current event of the XMLReader is an element with the given name. Note that this ignores the prefix of the name.


fun XmlReader.isElement(type: EventType, elementname: QName): Boolean

Check that the current state is a start element for the given name. The mPrefix is ignored.

Receiver

The stream reader to check

Parameters

type

The event type to check

elementname

The name to check against @return true if it matches, otherwise false


fun XmlReader.isElement(elementNamespace: String?, elementName: String, elementPrefix: String? = null): Boolean

Check that the current state is a start element for the given name. The mPrefix is ignored.

Receiver

The stream reader to check

Return

true if it matches, otherwise false

Parameters

elementNamespace

The namespace to check against.

elementName

The local name to check against

elementPrefix

The prefix to fall back on if the namespace can't be determined


fun XmlReader.isElement(type: EventType, elementNamespace: String?, elementName: String, elementPrefix: String? = null): Boolean

Check that the current state is a start element for the given name. The mPrefix is ignored.

Receiver

The stream reader to check

Parameters

type

The type to verify. Should be named so start or end element

elementNamespace

The namespace to check against.

elementName

The local name to check against

elementPrefix

The prefix to fall back on if the namespace can't be determined @return true if it matches, otherwise false