Base element.
More...
|
| __init__ (self, tag=PGF_TAG, encoding=UTF8, filename=None, msg=None) |
|
| setencoding (self, encoding) |
| Sets encoding attribute of this instance.
|
|
| tostring (self, doindent=True) |
| Formats the object and its contents to an XML string.
|
|
| fromstring (self, msg) |
| Formats the object from an XML message string.
|
|
| indent (self, elem=None, level=0) |
| Indents self.
|
|
| save (self, filename=None, doindent=True) |
| Writes an XML message to file.
|
|
| read (self, filename=None) |
| Reads a message from XML file.
|
|
| append (self, el) |
|
| find (self, name) |
|
| remove (self, element) |
|
| set (self, key, value) |
|
| subelement (self, key) |
|
| getelement (self) |
|
|
| tag = tag |
|
| encoding = encoding |
|
| filename = filename |
|
| element = BltXMLElement(tag) |
|
str | header = """<?xml version="1.0" encoding="%s"?>""" % encoding |
|
◆ __init__()
Lib.BaltradMessageXML.BltXML.__init__ |
( |
| self, |
|
|
| tag = PGF_TAG, |
|
|
| encoding = UTF8, |
|
|
| filename = None, |
|
|
| msg = None ) |
◆ fromstring()
Lib.BaltradMessageXML.BltXML.fromstring |
( |
| self, |
|
|
| msg ) |
Formats the object from an XML message string.
- Parameters
-
msg | string XML representation of the message. |
◆ indent()
Lib.BaltradMessageXML.BltXML.indent |
( |
| self, |
|
|
| elem = None, |
|
|
| level = 0 ) |
◆ read()
Lib.BaltradMessageXML.BltXML.read |
( |
| self, |
|
|
| filename = None ) |
Reads a message from XML file.
- Parameters
-
filename | string of the XML file to read. |
◆ save()
Lib.BaltradMessageXML.BltXML.save |
( |
| self, |
|
|
| filename = None, |
|
|
| doindent = True ) |
Writes an XML message to file.
- Parameters
-
filename | string of the file to write. |
◆ setencoding()
Lib.BaltradMessageXML.BltXML.setencoding |
( |
| self, |
|
|
| encoding ) |
Sets encoding attribute of this instance.
- Parameters
-
encoding | string, the character encoding used, should probably be UTF-8. |
◆ tostring()
Lib.BaltradMessageXML.BltXML.tostring |
( |
| self, |
|
|
| doindent = True ) |
Formats the object and its contents to an XML string.
Suggestion: add line breaks and indentation.
- Returns
- string XML representation of this message.
The documentation for this class was generated from the following file: