MCPcopy Index your code
hub / github.com/MapServer/MapServer / msSOSAddMetadataChildNode

Function msSOSAddMetadataChildNode

mapogcsos.c:195–216  ·  view source on GitHub ↗

/ msSOSAddMetadataChildNode */ / Utility function to add a metadata node. */ /

Source from the content-addressed store, hash-verified

193/* Utility function to add a metadata node. */
194/************************************************************************/
195void msSOSAddMetadataChildNode(xmlNodePtr psParent, const char *psNodeName,
196 xmlNsPtr psNs, hashTableObj *metadata,
197 const char *psNamespaces,
198 const char *psMetadataName,
199 const char *psDefaultValue)
200{
201 xmlNodePtr psNode = NULL;
202 char *psValue = NULL;
203
204 if (psParent && psNodeName)
205 {
206 psValue = msOWSGetEncodeMetadata(metadata, psNamespaces, psMetadataName,
207 psDefaultValue);
208 if (psValue)
209 {
210 psNode = xmlNewChild(psParent, NULL, BAD_CAST psNodeName, BAD_CAST psValue);
211 if (psNs)
212 xmlSetNs(psNode, psNs);
213 free(psValue);
214 }
215 }
216}
217
218
219/************************************************************************/

Callers

nothing calls this directly

Calls 1

msOWSGetEncodeMetadataFunction · 0.85

Tested by

no test coverage detected