/ msSOSAddMetadataChildNode */ / Utility function to add a metadata node. */ /
| 193 | /* Utility function to add a metadata node. */ |
| 194 | /************************************************************************/ |
| 195 | void 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 | /************************************************************************/ |
nothing calls this directly
no test coverage detected