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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers spcanonxml.hpp Source File

spcanonxml.hpp

00001 /*
00002  * Copyright 2007 Stephen Liu
00003  * LGPL, see http://code.google.com/p/spxml/
00004  * For license terms, see the file COPYING along with this library.
00005  */
00006 
00007 #ifndef __spcanonxml_hpp__
00008 #define __spcanonxml_hpp__
00009 
00010 class SP_XmlNode;
00011 class SP_XmlStringBuffer;
00012 class SP_XmlDocDeclNode;
00013 class SP_XmlDocTypeNode;
00014 
00015 /// XML Canonical, defined by James Clark.
00016 class SP_CanonXmlBuffer {
00017 public:
00018     SP_CanonXmlBuffer( const SP_XmlNode * node );
00019     ~SP_CanonXmlBuffer();
00020 
00021     const char * getBuffer() const;
00022     int getSize() const;
00023 
00024 private:
00025     SP_CanonXmlBuffer( SP_CanonXmlBuffer & );
00026     SP_CanonXmlBuffer & operator=( SP_CanonXmlBuffer & );
00027 
00028     static void dump( const SP_XmlNode * node,
00029             SP_XmlStringBuffer * buffer );
00030     static void dumpElement( const SP_XmlNode * node,
00031             SP_XmlStringBuffer * buffer );
00032 
00033     static void canonEncode( const char * value,
00034             SP_XmlStringBuffer * buffer );
00035 
00036     SP_XmlStringBuffer * mBuffer;
00037 };
00038 
00039 #endif
00040