**msGetMapContextXMLStringValue() ** **Get the xml value and put it in the string field ** */
| 166 | ** |
| 167 | */ |
| 168 | int msGetMapContextXMLStringValue( CPLXMLNode *psRoot, char *pszXMLPath, |
| 169 | char **pszField) |
| 170 | { |
| 171 | char *pszValue; |
| 172 | |
| 173 | pszValue = (char*)CPLGetXMLValue( psRoot, pszXMLPath, NULL); |
| 174 | if(pszValue != NULL) |
| 175 | { |
| 176 | if( pszField != NULL ) |
| 177 | { |
| 178 | *pszField = msStrdup(pszValue); |
| 179 | } |
| 180 | else |
| 181 | { |
| 182 | return MS_FAILURE; |
| 183 | } |
| 184 | } |
| 185 | else |
| 186 | { |
| 187 | return MS_FAILURE; |
| 188 | } |
| 189 | |
| 190 | return MS_SUCCESS; |
| 191 | } |
| 192 | |
| 193 | |
| 194 | /* |
no test coverage detected