GeoWriter Class Reference
from PyKDE4.marble import *
Inherits: QXmlStreamWriter
Namespace: Marble
Detailed Description
Standard Marble way of writing XML This class is intended to be a standardised way of writing XML for marble. It works with the GeoData classes and writes XML based on the type of output format that the writer is currently working with.
Methods | |
__init__ (self) | |
setDocumentType (self, QString documentType) | |
bool | write (self, QIODevice device, Marble.GeoNode feature) |
writeElement (self, QString namespaceUri, QString key, QString value) | |
writeElement (self, QString key, QString value) | |
writeOptionalElement (self, QString key, QString value) |
Method Documentation
__init__ | ( | self ) |
setDocumentType | ( | self, | ||
QString | documentType | |||
) |
Set the current document type. The current Document Type defines which set of handlers are to be used when writing the GeoDocument. This string should correspond with the string used to register the required Tag Writers in
- See also:
- GeoTagWriter
bool write | ( | self, | ||
QIODevice | device, | |||
Marble.GeoNode | feature | |||
) |
The main API call to use the XML writer. To use the XML writer you need to provide an IODevice to write the XML to and a QList of GeoDataFeatures which contains the data you wish to write. To define the type of XML document that is to be written you need to set the current Document Type for this GeoWriter. See
- See also:
- setDocumentType()
writeElement | ( | self, | ||
QString | namespaceUri, | |||
QString | key, | |||
QString | value | |||
) |
Convenience method to write <key>value</key>
writeElement | ( | self, | ||
QString | key, | |||
QString | value | |||
) |
Convenience method to write <key>value</key>
writeOptionalElement | ( | self, | ||
QString | key, | |||
QString | value | |||
) |
Convenience method to write <key>value</key> if value is not empty. Otherwise, nothing is written.