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 2007 Stephen Liu
hlipka 0:3fa97f2c0505 3 * LGPL, see http://code.google.com/p/spxml/
hlipka 0:3fa97f2c0505 4 * For license terms, see the file COPYING along with this library.
hlipka 0:3fa97f2c0505 5 */
hlipka 0:3fa97f2c0505 6
hlipka 0:3fa97f2c0505 7 #ifndef __spcanonxml_hpp__
hlipka 0:3fa97f2c0505 8 #define __spcanonxml_hpp__
hlipka 0:3fa97f2c0505 9
hlipka 0:3fa97f2c0505 10 class SP_XmlNode;
hlipka 0:3fa97f2c0505 11 class SP_XmlStringBuffer;
hlipka 0:3fa97f2c0505 12 class SP_XmlDocDeclNode;
hlipka 0:3fa97f2c0505 13 class SP_XmlDocTypeNode;
hlipka 0:3fa97f2c0505 14
hlipka 0:3fa97f2c0505 15 /// XML Canonical, defined by James Clark.
hlipka 0:3fa97f2c0505 16 class SP_CanonXmlBuffer {
hlipka 0:3fa97f2c0505 17 public:
hlipka 0:3fa97f2c0505 18 SP_CanonXmlBuffer( const SP_XmlNode * node );
hlipka 0:3fa97f2c0505 19 ~SP_CanonXmlBuffer();
hlipka 0:3fa97f2c0505 20
hlipka 0:3fa97f2c0505 21 const char * getBuffer() const;
hlipka 0:3fa97f2c0505 22 int getSize() const;
hlipka 0:3fa97f2c0505 23
hlipka 0:3fa97f2c0505 24 private:
hlipka 0:3fa97f2c0505 25 SP_CanonXmlBuffer( SP_CanonXmlBuffer & );
hlipka 0:3fa97f2c0505 26 SP_CanonXmlBuffer & operator=( SP_CanonXmlBuffer & );
hlipka 0:3fa97f2c0505 27
hlipka 0:3fa97f2c0505 28 static void dump( const SP_XmlNode * node,
hlipka 0:3fa97f2c0505 29 SP_XmlStringBuffer * buffer );
hlipka 0:3fa97f2c0505 30 static void dumpElement( const SP_XmlNode * node,
hlipka 0:3fa97f2c0505 31 SP_XmlStringBuffer * buffer );
hlipka 0:3fa97f2c0505 32
hlipka 0:3fa97f2c0505 33 static void canonEncode( const char * value,
hlipka 0:3fa97f2c0505 34 SP_XmlStringBuffer * buffer );
hlipka 0:3fa97f2c0505 35
hlipka 0:3fa97f2c0505 36 SP_XmlStringBuffer * mBuffer;
hlipka 0:3fa97f2c0505 37 };
hlipka 0:3fa97f2c0505 38
hlipka 0:3fa97f2c0505 39 #endif
hlipka 0:3fa97f2c0505 40