Return false if current element namespace is not a KML one Return true otherwise.
Definition at line 163 of file lwgeom_in_kml.c.
164{
165 xmlNsPtr *ns, *p;
166
167 ns = xmlGetNsList(xnode->doc, xnode);
168
169
170
171
172
173 if (ns == NULL) return !is_strict;
174
175 for (p=ns ; *p ; p++)
176 {
177 if ((*p)->href == NULL || (*p)->prefix == NULL ||
178 xnode->ns == NULL || xnode->ns->prefix == NULL) continue;
179
180 if (!xmlStrcmp(xnode->ns->prefix, (*p)->prefix))
181 {
182 if (!strcmp((
char *) (*p)->href,
KML_NS))
183 {
184 xmlFree(ns);
185 return true;
186 } else {
187 xmlFree(ns);
188 return false;
189 }
190 }
191 }
192
193 xmlFree(ns);
194 return !is_strict; ;
195}
References KML_NS.
Referenced by parse_kml(), parse_kml_coordinates(), parse_kml_multi(), and parse_kml_polygon().