Module gnue.common.definitions.GParser
Class that contains a SAX2-based XML processor for GNUe
| Classes |
GImport |
|
GImportItem |
This class is used for loading importable items from external
resources. |
xmlHandler |
This class is used by the XML parser to process the XML file. |
| Function Summary |
| |
loadXMLObject(stream,
handler,
rootType,
xmlFileType,
initialize,
attributes,
initParameters,
url,
checkRequired)
This method loads an object from a XML stream and returns that
object. |
| |
normalise_whitespace(text)
Remove redundant whitespace characters from a string. |
loadXMLObject(stream,
handler,
rootType,
xmlFileType,
initialize=True,
attributes={},
initParameters={},
url=None,
checkRequired=True)
This method loads an object from a XML stream and returns that
object. If initialize is True (default), then the object is initialized
and ready to go. Setting initialize to 0 is useful for a design
environment where the object is not actually being used, but simply
loaded as a document.
"attributes" is a dictionary containing extra attributes
that should be attached to this object.
e.g., if attributes={myproperty:[0,1,2]}, then before the object is
initialized or returned, object.myproperty == [0,1,2].
-
|
normalise_whitespace(text)
Remove redundant whitespace characters from a string.
-
- Parameters:
text -
string to remove redundant whitespaces (space, tabs, ...)
- Returns:
-
normalized string
|