File indexing completed on 2025-04-20 03:36:10
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2011 Thibaut Gridel <tgridel@free.fr> 0004 0005 #include "GeoDataDocument.h" 0006 #include "KmlParser.h" 0007 #include "KmlElementDictionary.h" 0008 0009 namespace Marble { 0010 0011 KmlParser::KmlParser() 0012 : GeoParser( 0 ) 0013 { 0014 } 0015 0016 KmlParser::~KmlParser() 0017 { 0018 } 0019 0020 bool KmlParser::isValidRootElement() 0021 { 0022 return isValidElement(kml::kmlTag_kml); 0023 } 0024 0025 bool KmlParser::isValidElement(const QString& tagName) const 0026 { 0027 if (!GeoParser::isValidElement(tagName)) 0028 return false; 0029 0030 return (namespaceUri() == kml::kmlTag_nameSpace20 || 0031 namespaceUri() == kml::kmlTag_nameSpace21 || 0032 namespaceUri() == kml::kmlTag_nameSpace22 || 0033 namespaceUri() == kml::kmlTag_nameSpaceGx22 || 0034 namespaceUri() == kml::kmlTag_nameSpaceOgc22|| 0035 namespaceUri() == kml::kmlTag_nameSpaceMx ); 0036 } 0037 0038 GeoDocument* KmlParser::createDocument() const 0039 { 0040 return new GeoDataDocument; 0041 } 0042 0043 }