PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ gmlGetProp()

static xmlChar * gmlGetProp ( xmlNodePtr  xnode,
const char *  charProp 
)
static

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

Definition at line 205 of file lwgeom_in_gml.c.

206{
207 xmlChar *value;
208 xmlChar *prop = (xmlChar*)charProp;
209
210 if (!is_gml_namespace(xnode, true))
211 return xmlGetProp(xnode, prop);
212 /*
213 * Handle namespaces:
214 * - http://www.opengis.net/gml (GML 3.1.1 and priors)
215 * - http://www.opengis.net/gml/3.2 (GML 3.2.1)
216 */
217 value = xmlGetNsProp(xnode, prop, (xmlChar *) GML_NS);
218 if (value == NULL) value = xmlGetNsProp(xnode, prop, (xmlChar *) GML32_NS);
219
220 /* In last case try without explicit namespace */
221 if (value == NULL) value = xmlGetNoNsProp(xnode, prop);
222
223 return value;
224}
#define GML_NS
#define GML32_NS
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, and is_gml_namespace().

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: