Mbed port of the Simple Plain Xml parser. See http://code.google.com/p/spxml/ for more details. This library uses less memory and is much better suited to streaming data than TinyXML (doesn\'t use as much C++ features, and especially works without streams). See http://mbed.org/users/hlipka/notebook/xml-parsing/ for usage examples.

Dependents:   spxmltest_weather VFD_fontx2_weather weather_LCD_display News_LCD_display ... more

Committer:
hlipka
Date:
Wed Nov 24 20:52:14 2010 +0000
Revision:
0:3fa97f2c0505
initial revision

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hlipka 0:3fa97f2c0505 1 /*
hlipka 0:3fa97f2c0505 2 * Copyright (c) 2010 Hendrik Lipka
hlipka 0:3fa97f2c0505 3 *
hlipka 0:3fa97f2c0505 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
hlipka 0:3fa97f2c0505 5 * of this software and associated documentation files (the "Software"), to deal
hlipka 0:3fa97f2c0505 6 * in the Software without restriction, including without limitation the rights
hlipka 0:3fa97f2c0505 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
hlipka 0:3fa97f2c0505 8 * copies of the Software, and to permit persons to whom the Software is
hlipka 0:3fa97f2c0505 9 * furnished to do so, subject to the following conditions:
hlipka 0:3fa97f2c0505 10 *
hlipka 0:3fa97f2c0505 11 * The above copyright notice and this permission notice shall be included in
hlipka 0:3fa97f2c0505 12 * all copies or substantial portions of the Software.
hlipka 0:3fa97f2c0505 13 *
hlipka 0:3fa97f2c0505 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
hlipka 0:3fa97f2c0505 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
hlipka 0:3fa97f2c0505 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
hlipka 0:3fa97f2c0505 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
hlipka 0:3fa97f2c0505 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
hlipka 0:3fa97f2c0505 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
hlipka 0:3fa97f2c0505 20 * THE SOFTWARE.
hlipka 0:3fa97f2c0505 21 */
hlipka 0:3fa97f2c0505 22
hlipka 0:3fa97f2c0505 23 /*
hlipka 0:3fa97f2c0505 24 implementation for the missing strdup function
hlipka 0:3fa97f2c0505 25 */
hlipka 0:3fa97f2c0505 26
hlipka 0:3fa97f2c0505 27 #include <string.h>
hlipka 0:3fa97f2c0505 28 #include <stdlib.h>
hlipka 0:3fa97f2c0505 29
hlipka 0:3fa97f2c0505 30 char* strdup (const char *str) {
hlipka 0:3fa97f2c0505 31 char *result = (char*)(malloc (strlen (str) + 1));
hlipka 0:3fa97f2c0505 32 if (result != NULL)
hlipka 0:3fa97f2c0505 33 strcpy (result,str);
hlipka 0:3fa97f2c0505 34 return result;
hlipka 0:3fa97f2c0505 35 }