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
spdomiterator.hpp@0:3fa97f2c0505, 2010-11-24 (annotated)
- Committer:
- hlipka
- Date:
- Wed Nov 24 20:52:14 2010 +0000
- Revision:
- 0:3fa97f2c0505
initial revision
Who changed what in which revision?
User | Revision | Line number | New 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 __spdomiterator_hpp__ |
hlipka | 0:3fa97f2c0505 | 8 | #define __spdomiterator_hpp__ |
hlipka | 0:3fa97f2c0505 | 9 | |
hlipka | 0:3fa97f2c0505 | 10 | class SP_XmlNode; |
hlipka | 0:3fa97f2c0505 | 11 | |
hlipka | 0:3fa97f2c0505 | 12 | /// DFS iterator -- Depth First Search |
hlipka | 0:3fa97f2c0505 | 13 | class SP_DomIterator { |
hlipka | 0:3fa97f2c0505 | 14 | public: |
hlipka | 0:3fa97f2c0505 | 15 | /// node as tree node, iterator this tree by DFS |
hlipka | 0:3fa97f2c0505 | 16 | SP_DomIterator( const SP_XmlNode * node ); |
hlipka | 0:3fa97f2c0505 | 17 | ~SP_DomIterator(); |
hlipka | 0:3fa97f2c0505 | 18 | |
hlipka | 0:3fa97f2c0505 | 19 | /// @return NULL : reach the end |
hlipka | 0:3fa97f2c0505 | 20 | const SP_XmlNode * getNext(); |
hlipka | 0:3fa97f2c0505 | 21 | |
hlipka | 0:3fa97f2c0505 | 22 | private: |
hlipka | 0:3fa97f2c0505 | 23 | |
hlipka | 0:3fa97f2c0505 | 24 | SP_DomIterator( SP_DomIterator & ); |
hlipka | 0:3fa97f2c0505 | 25 | SP_DomIterator & operator=( SP_DomIterator & ); |
hlipka | 0:3fa97f2c0505 | 26 | |
hlipka | 0:3fa97f2c0505 | 27 | const SP_XmlNode * mRoot; |
hlipka | 0:3fa97f2c0505 | 28 | const SP_XmlNode * mCurrent; |
hlipka | 0:3fa97f2c0505 | 29 | }; |
hlipka | 0:3fa97f2c0505 | 30 | |
hlipka | 0:3fa97f2c0505 | 31 | #endif |
hlipka | 0:3fa97f2c0505 | 32 |