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