PostGIS  2.2.7dev-r@@SVN_REVISION@@
static xmlChar* gmlGetProp ( xmlNodePtr  xnode,
xmlChar *  prop 
)
static

Retrieve a GML propertie from a node or NULL otherwise Respect namespaces if presents in the node element.

Definition at line 160 of file lwgeom_in_gml.c.

References GML32_NS, GML_NS, is_gml_namespace(), and genraster::value.

Referenced by get_xlink_node(), parse_gml_coordinates(), parse_gml_curve(), parse_gml_patch(), parse_gml_pos(), parse_gml_poslist(), parse_gml_srs(), and parse_gml_triangle().

161 {
162  xmlChar *value;
163 
164  if (!is_gml_namespace(xnode, true))
165  return xmlGetProp(xnode, prop);
166  /*
167  * Handle namespaces:
168  * - http://www.opengis.net/gml (GML 3.1.1 and priors)
169  * - http://www.opengis.net/gml/3.2 (GML 3.2.1)
170  */
171  value = xmlGetNsProp(xnode, prop, (xmlChar *) GML_NS);
172  if (value == NULL) value = xmlGetNsProp(xnode, prop, (xmlChar *) GML32_NS);
173 
174  /* In last case try without explicit namespace */
175  if (value == NULL) value = xmlGetNoNsProp(xnode, prop);
176 
177  return value;
178 }
#define GML32_NS
Definition: lwgeom_in_gml.c:63
#define GML_NS
Definition: lwgeom_in_gml.c:62
static bool is_gml_namespace(xmlNodePtr xnode, bool is_strict)
Return false if current element namespace is not a GML one Return true otherwise. ...

Here is the call graph for this function:

Here is the caller graph for this function: