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 spdomiterator.hpp Source File

spdomiterator.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 __spdomiterator_hpp__
00008 #define __spdomiterator_hpp__
00009 
00010 class SP_XmlNode;
00011 
00012 /// DFS iterator -- Depth First Search
00013 class SP_DomIterator {
00014 public:
00015     /// node as tree node, iterator this tree by DFS
00016     SP_DomIterator( const SP_XmlNode * node );
00017     ~SP_DomIterator();
00018 
00019     /// @return NULL : reach the end
00020     const SP_XmlNode * getNext ();
00021 
00022 private:
00023 
00024     SP_DomIterator( SP_DomIterator & );
00025     SP_DomIterator & operator=( SP_DomIterator & );
00026 
00027     const SP_XmlNode * mRoot;
00028     const SP_XmlNode * mCurrent;
00029 };
00030 
00031 #endif
00032