Class: QgsGmlSchema

Represents a GML schema.

Class Hierarchy

Inheritance diagram of qgis.core.QgsGmlSchema

Base classes

QObject

class qgis.core.QgsGmlSchema[source]

Bases: QObject

error(self) QgsError[source]

Gets error if parseXSD() or guessSchema() failed

Return type:

QgsError

fields(self, typeName: str | None) Any

Gets fields for type/class name parsed from GML or XSD

Parameters:

typeName (Optional[str])

Return type:

Any

geometryAttributes(self, typeName: str | None) List[str][source]

Gets list of geometry attributes for type/class name

Parameters:

typeName (Optional[str])

Return type:

List[str]

guessSchema(self, data: QByteArray | bytes | bytearray) bool[source]

Guess GML schema from data if XSD does not exist. Currently only recognizes UMN Mapserver GetFeatureInfo GML response. Supports only UTF-8, UTF-16, ISO-8859-1, US-ASCII XML encodings.

Parameters:

data (Union[QByteArray, bytes, bytearray]) – GML data

Return type:

bool

Returns:

True in case of success

parseXSD(self, xml: QByteArray | bytes | bytearray) bool[source]

Gets fields info from XSD

Parameters:

xml (Union[QByteArray, bytes, bytearray])

Return type:

bool

typeNames(self) List[str][source]

Gets list of dot separated paths to feature classes parsed from GML or XSD

Return type:

List[str]