PostGIS  3.4.0dev-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 175 of file lwgeom_in_gml.c.

176 {
177  xmlChar *value;
178 
179  if (!is_gml_namespace(xnode, true))
180  return xmlGetProp(xnode, prop);
181  /*
182  * Handle namespaces:
183  * - http://www.opengis.net/gml (GML 3.1.1 and priors)
184  * - http://www.opengis.net/gml/3.2 (GML 3.2.1)
185  */
186  value = xmlGetNsProp(xnode, prop, (xmlChar *) GML_NS);
187  if (value == NULL) value = xmlGetNsProp(xnode, prop, (xmlChar *) GML32_NS);
188 
189  /* In last case try without explicit namespace */
190  if (value == NULL) value = xmlGetNoNsProp(xnode, prop);
191 
192  return value;
193 }
#define GML_NS
Definition: lwgeom_in_gml.c:76
#define GML32_NS
Definition: lwgeom_in_gml.c:77
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:62

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: