Class: QgsXmlUtils

class qgis.core.QgsXmlUtils

Bases: sip.wrapper

Assorted helper methods for reading and writing chunks of XML

Enums

Methods

readMapUnits Decodes a distance unit from a DOM element.
readRectangle
readVariant Read a QVariant from a QDomElement.
writeMapUnits Encodes a distance unit to a DOM element.
writeRectangle
writeVariant Write a QVariant to a QDomElement.

Signals

Attributes

readMapUnits(element: QDomElement) → QgsUnitTypes.DistanceUnit

Decodes a distance unit from a DOM element.

Parameters:element – DOM element to decode
Returns:distance units

See also

writeMapUnits()

readRectangle(element: QDomElement) → QgsRectangle
readVariant(element: QDomElement) → Any

Read a QVariant from a QDomElement.

writeMapUnits(units: QgsUnitTypes.DistanceUnit, doc: QDomDocument) → QDomElement

Encodes a distance unit to a DOM element.

Parameters:
  • units – units to encode
  • doc – DOM document
Returns:

element containing encoded units

See also

readMapUnits()

writeRectangle(rect: QgsRectangle, doc: QDomDocument) → QDomElement
writeVariant(value: Any, doc: QDomDocument) → QDomElement

Write a QVariant to a QDomElement.

Supported types are