15 #ifndef QGSGMLSCHEMA_H
16 #define QGSGMLSCHEMA_H
31 #include <QDomElement>
32 #include <QStringList>
46 QList<QgsField> &
fields() {
return mFields; }
48 int fieldIndex(
const QString & name );
50 QString
path()
const {
return mPath; }
83 bool parseXSD(
const QByteArray &xml );
89 bool guessSchema(
const QByteArray &data );
92 QStringList typeNames()
const;
95 QList<QgsField> fields(
const QString & typeName );
98 QStringList geometryAttributes(
const QString & typeName );
113 void startElement(
const XML_Char* el,
const XML_Char** attr );
114 void endElement(
const XML_Char* el );
115 void characters(
const XML_Char* chars,
int len );
116 static void start(
void* data,
const XML_Char* el,
const XML_Char** attr )
118 static_cast<QgsGmlSchema*
>( data )->startElement( el, attr );
120 static void end(
void* data,
const XML_Char* el )
124 static void chars(
void* data,
const XML_Char* chars,
int len )
126 static_cast<QgsGmlSchema*
>( data )->characters( chars, len );
133 QString readAttribute(
const QString& attributeName,
const XML_Char** attr )
const;
136 QWidget* findMainWindow()
const;
139 QList<QDomElement> domElements(
const QDomElement &element,
const QString & path );
142 QDomElement domElement(
const QDomElement &element,
const QString & path );
145 QList<QDomElement> domElements( QList<QDomElement> &elements,
const QString & attr,
const QString & attrVal );
148 QDomElement domElement(
const QDomElement &element,
const QString & path,
const QString & attr,
const QString & attrVal );
151 QString stripNS(
const QString & name );
158 QString xsdComplexTypeGmlBaseType(
const QDomElement &element,
const QString & name );
161 bool xsdFeatureClass(
const QDomElement &element,
const QString & typeName,
QgsGmlFeatureClass & featureClass );