Home ⌂Doc Index ◂Up ▴

eric6.E5XML.XMLStreamReaderBase

Module implementing a base class for all of eric6s XML stream writers.

Global Attributes

None

Classes

XMLStreamReaderBase Class implementing a base class for all of eric6s XML stream readers.

Functions

None


XMLStreamReaderBase

Class implementing a base class for all of eric6s XML stream readers.

Derived from

QXmlStreamReader

Class Attributes

None

Class Methods

None

Methods

XMLStreamReaderBase Constructor
__readDict Private method to read a Python dictionary.
__readFrozenset Private method to read a Python set.
__readList Private method to read a Python list.
__readSet Private method to read a Python set.
__readTuple Private method to read a Python tuple.
_readBasics Protected method to read an object of a basic Python type.
_skipUnknownElement Protected method to skip over all unknown elements.
attribute Public method to read the given attribute of the current tag.
raiseBadValue Public method to raise an error for a bad value.
raiseUnexpectedStartTag Public method to raise an error for an unexpected start tag.
raiseUnsupportedFormatVersion Public method to raise an error for an unsupported file format version.
readXML Public method to read and parse the XML document.
showErrorMessage Public method to show an error message.
toBool Public method to convert the given value to bool.

Static Methods

None

XMLStreamReaderBase (Constructor)

XMLStreamReaderBase(device)

Constructor

device
reference to the I/O device to read from (QIODevice)

XMLStreamReaderBase.__readDict

__readDict()

Private method to read a Python dictionary.

Returns:
Python dictionary

XMLStreamReaderBase.__readFrozenset

__readFrozenset()

Private method to read a Python set.

Returns:
Python set

XMLStreamReaderBase.__readList

__readList()

Private method to read a Python list.

Returns:
Python list

XMLStreamReaderBase.__readSet

__readSet()

Private method to read a Python set.

Returns:
Python set

XMLStreamReaderBase.__readTuple

__readTuple()

Private method to read a Python tuple.

Returns:
Python tuple

XMLStreamReaderBase._readBasics

_readBasics()

Protected method to read an object of a basic Python type.

Returns:
Python object read

XMLStreamReaderBase._skipUnknownElement

_skipUnknownElement()

Protected method to skip over all unknown elements.

XMLStreamReaderBase.attribute

attribute(name, default="")

Public method to read the given attribute of the current tag.

name
name of the attribute (string)
default
default value (string)
Returns:
value of the requested tag attribute (string)

XMLStreamReaderBase.raiseBadValue

raiseBadValue(value)

Public method to raise an error for a bad value.

value
bad value (string)

XMLStreamReaderBase.raiseUnexpectedStartTag

raiseUnexpectedStartTag(tag)

Public method to raise an error for an unexpected start tag.

tag
name of the unexpected tag (string)

XMLStreamReaderBase.raiseUnsupportedFormatVersion

raiseUnsupportedFormatVersion(version)

Public method to raise an error for an unsupported file format version.

version
unsupported version (string)

XMLStreamReaderBase.readXML

readXML()

Public method to read and parse the XML document.

XMLStreamReaderBase.showErrorMessage

showErrorMessage()

Public method to show an error message.

XMLStreamReaderBase.toBool

toBool(value)

Public method to convert the given value to bool.

value
value to be converted ("True", "False", "1", "0")
Returns:
converted value (boolean) or None in case of an error
Up



Home ⌂Doc Index ◂Up ▴