PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gmlGetProp()

static xmlChar* gmlGetProp ( xmlNodePtr  xnode,
xmlChar *  prop 
)
static

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

Definition at line 181 of file lwgeom_in_gml.c.

182 {
183  xmlChar *value;
184 
185  if (!is_gml_namespace(xnode, true))
186  return xmlGetProp(xnode, prop);
187  /*
188  * Handle namespaces:
189  * - http://www.opengis.net/gml (GML 3.1.1 and priors)
190  * - http://www.opengis.net/gml/3.2 (GML 3.2.1)
191  */
192  value = xmlGetNsProp(xnode, prop, (xmlChar *) GML_NS);
193  if (value == NULL) value = xmlGetNsProp(xnode, prop, (xmlChar *) GML32_NS);
194 
195  /* In last case try without explicit namespace */
196  if (value == NULL) value = xmlGetNoNsProp(xnode, prop);
197 
198  return value;
199 }
#define GML_NS
Definition: lwgeom_in_gml.c:77
#define GML32_NS
Definition: lwgeom_in_gml.c:78
static bool is_gml_namespace(xmlNodePtr xnode, bool is_strict)
Return false if current element namespace is not a GML one Return true otherwise.
int value
Definition: genraster.py:61

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().

Here is the call graph for this function:
Here is the caller graph for this function: