15 #ifndef QGSGMLSCHEMA_H
16 #define QGSGMLSCHEMA_H
32 #include <QDomElement>
33 #include <QStringList>
47 QList<QgsField> &
fields() {
return mFields; }
49 int fieldIndex(
const QString & name );
51 QString
path()
const {
return mPath; }
84 bool parseXSD(
const QByteArray &xml );
91 bool guessSchema(
const QByteArray &data );
94 QStringList typeNames()
const;
97 QList<QgsField> fields(
const QString & typeName );
100 QStringList geometryAttributes(
const QString & typeName );
119 void startElement(
const XML_Char* el,
const XML_Char** attr );
120 void endElement(
const XML_Char* el );
121 void characters(
const XML_Char* chars,
int len );
122 static void start(
void* data,
const XML_Char* el,
const XML_Char** attr )
124 static_cast<QgsGmlSchema*
>( data )->startElement( el, attr );
126 static void end(
void* data,
const XML_Char* el )
130 static void chars(
void* data,
const XML_Char* chars,
int len )
132 static_cast<QgsGmlSchema*
>( data )->characters( chars, len );
139 QString readAttribute(
const QString& attributeName,
const XML_Char** attr )
const;
142 QWidget* findMainWindow()
const;
145 QList<QDomElement> domElements(
const QDomElement &element,
const QString & path );
148 QDomElement domElement(
const QDomElement &element,
const QString & path );
151 QList<QDomElement> domElements( QList<QDomElement> &elements,
const QString & attr,
const QString & attrVal );
154 QDomElement domElement(
const QDomElement &element,
const QString & path,
const QString & attr,
const QString & attrVal );
157 QString stripNS(
const QString & name );
164 QString xsdComplexTypeGmlBaseType(
const QDomElement &element,
const QString & name );
167 bool xsdFeatureClass(
const QDomElement &element,
const QString & typeName,
QgsGmlFeatureClass & featureClass );