eric4.E4XML.XMLHandlerBase

Module implementing a base class for all of eric4s XML handlers.

Global Attributes

None

Classes

XMLHandlerBase Class implementing the base class for al of eric4s XML handlers.

Functions

None


XMLHandlerBase

Class implementing the base class for al of eric4s XML handlers.

Derived from

ContentHandler

Class Attributes

None

Methods

XMLHandlerBase Constructor
_prepareBasics Protected method to prepare the parsing of XML for basic python types.
characters Handler called for ordinary text.
decodedNewLines Public method to decode newlines and paragraph breaks.
defaultEndElement Handler method for the common end tags.
defaultStartElement Handler method for common start tags.
endBool Handler method for the "bool" end tag.
endComplex Handler method for the "complex" end tag.
endDictionary Handler method for the "dictionary" end tag.
endElement Handler called, when an ending tag is found.
endFloat Handler method for the "float" end tag.
endInt Handler method for the "int" end tag.
endList Handler method for the "list" end tag.
endLong Handler method for the "long" end tag.
endNone Handler method for the "none" end tag.
endPickle Handler method for the "pickle" end tag.
endString Handler method for the "string" end tag.
endTuple Handler method for the "tuple" end tag.
endUnicode Handler method for the "unicode" end tag.
startDictionary Handler method for the "dictionary" start tag.
startDocument Handler called, when the document parsing is started.
startElement Handler called, when a starting tag is found.
startList Handler method for the "list" start tag.
startPickle Handler method for the "pickle" start tag.
startTuple Handler method for the "tuple" start tag.
unescape Public method used to unescape certain characters.
utf8_to_code Public method to convert a string to unicode and encode it for XML.

XMLHandlerBase (Constructor)

XMLHandlerBase()

Constructor

XMLHandlerBase._prepareBasics

_prepareBasics()

Protected method to prepare the parsing of XML for basic python types.

XMLHandlerBase.characters

characters(chars)

Handler called for ordinary text.

chars
the scanned text (string)

XMLHandlerBase.decodedNewLines

decodedNewLines(text)

Public method to decode newlines and paragraph breaks.

text
text to decode (string or QString)

XMLHandlerBase.defaultEndElement

defaultEndElement()

Handler method for the common end tags.

XMLHandlerBase.defaultStartElement

defaultStartElement(attrs)

Handler method for common start tags.

attrs
list of tag attributes

XMLHandlerBase.endBool

endBool()

Handler method for the "bool" end tag.

XMLHandlerBase.endComplex

endComplex()

Handler method for the "complex" end tag.

XMLHandlerBase.endDictionary

endDictionary()

Handler method for the "dictionary" end tag.

XMLHandlerBase.endElement

endElement(name)

Handler called, when an ending tag is found.

name
name of the tag (string)

XMLHandlerBase.endFloat

endFloat()

Handler method for the "float" end tag.

XMLHandlerBase.endInt

endInt()

Handler method for the "int" end tag.

XMLHandlerBase.endList

endList()

Handler method for the "list" end tag.

XMLHandlerBase.endLong

endLong()

Handler method for the "long" end tag.

XMLHandlerBase.endNone

endNone()

Handler method for the "none" end tag.

XMLHandlerBase.endPickle

endPickle()

Handler method for the "pickle" end tag.

XMLHandlerBase.endString

endString()

Handler method for the "string" end tag.

XMLHandlerBase.endTuple

endTuple()

Handler method for the "tuple" end tag.

XMLHandlerBase.endUnicode

endUnicode()

Handler method for the "unicode" end tag.

XMLHandlerBase.startDictionary

startDictionary(attrs)

Handler method for the "dictionary" start tag.

attrs
list of tag attributes

XMLHandlerBase.startDocument

startDocument()

Handler called, when the document parsing is started.

XMLHandlerBase.startElement

startElement(name, attrs)

Handler called, when a starting tag is found.

name
name of the tag (string)
attrs
list of tag attributes

XMLHandlerBase.startList

startList(attrs)

Handler method for the "list" start tag.

attrs
list of tag attributes

XMLHandlerBase.startPickle

startPickle(attrs)

Handler method for the "pickle" start tag.

attrs
list of tag attributes

XMLHandlerBase.startTuple

startTuple(attrs)

Handler method for the "tuple" start tag.

attrs
list of tag attributes

XMLHandlerBase.unescape

unescape(text, attribute = False)

Public method used to unescape certain characters.

text
the text to unescape (string)
attribute
flag indicating unescaping is done for an attribute

XMLHandlerBase.utf8_to_code

utf8_to_code(text)

Public method to convert a string to unicode and encode it for XML.

text
the text to encode (string)
Up