Skip to content

Commit ee4cb3d

Browse files
committed
Remove namespace prefix from typename in QgsGml
1 parent a788b0d commit ee4cb3d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/core/qgsgml.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ QgsGml::QgsGml(
5050
}
5151

5252
mEndian = QgsApplication::endian();
53+
54+
int index = mTypeName.indexOf( ":" );
55+
if ( index != -1 && index < mTypeName.length() )
56+
{
57+
mTypeName = mTypeName.mid( index + 1 );
58+
}
5359
}
5460

5561
QgsGml::~QgsGml()
@@ -187,8 +193,7 @@ void QgsGml::startElement( const XML_Char* el, const XML_Char** attr )
187193
{
188194
mParseModeStack.push( QgsGml::boundingBox );
189195
}
190-
else if ( elementName == GML_NAMESPACE + NS_SEPARATOR + "featureMember" )
191-
//else if ( localName == mTypeName )
196+
else if ( localName == mTypeName )
192197
{
193198
mCurrentFeature = new QgsFeature( mFeatureCount );
194199
QgsAttributes attributes( mThematicAttributes.size() ); //add empty attributes
@@ -306,8 +311,7 @@ void QgsGml::endElement( const XML_Char* el )
306311
mParseModeStack.pop();
307312
}
308313
}
309-
//else if ( localName == mTypeName )
310-
else if ( elementName == GML_NAMESPACE + NS_SEPARATOR + "featureMember" )
314+
else if ( localName == mTypeName )
311315
{
312316
if ( mCurrentWKBSize > 0 )
313317
{

0 commit comments

Comments
 (0)