#include <xmlstorage.h>
Public Types | |
enum | XML_STATE { XSS_NONE, XSS_START_ELEMENT, XSS_END_ELEMENT, XSS_ELEMENT, XSS_CHARACTERS } |
Public Member Functions | |
XMLStateReader (XMLNode *node, std::istream &in) | |
bool | has_next () |
void | next () |
virtual void | StartElementHandler (const XS_String &name, const XMLNode::AttributeMap &attr) |
notifications about XML start tag | |
virtual void | EndElementHandler () |
notifications about XML end tag | |
virtual void | DefaultHandler (const std::string &s) |
store content, white space and comments | |
Public Attributes | |
ParseContext | _parse_ctx |
enum XML_STATE | _state |
XS_String | _node_name |
XMLNode::AttributeMap | _attrs |
Definition at line 2985 of file xmlstorage.h.
Definition at line 2987 of file xmlstorage.h.
{ XSS_NONE, XSS_START_ELEMENT, XSS_END_ELEMENT, XSS_ELEMENT, XSS_CHARACTERS, // XSS_COMMENT, // XSS_SPACE, // XSS_CDATA, // XSS_PROCESSING_INSTRUCTION };
XMLStorage::XMLStateReader::XMLStateReader | ( | XMLNode * | node, |
std::istream & | in | ||
) | [inline] |
Definition at line 2999 of file xmlstorage.h.
: XMLReader(node, in), _parse_ctx(*this), _state(XSS_NONE) { }
void XMLStorage::XMLStateReader::DefaultHandler | ( | const std::string & | s ) | [virtual] |
store content, white space and comments
Reimplemented from XMLStorage::XMLReaderBase.
Definition at line 1291 of file xmlstorage.cpp.
{ _content.append(EncodeXMLString(s)); assert(_state==XSS_NONE); _state = XSS_CHARACTERS; }
void XMLStorage::XMLStateReader::EndElementHandler | ( | ) | [virtual] |
notifications about XML end tag
Reimplemented from XMLStorage::XMLReaderBase.
Definition at line 1277 of file xmlstorage.cpp.
{ // _node_name.erase(); // _attrs.clear(); _content.erase(); if (_state == XSS_START_ELEMENT) _state = XSS_ELEMENT; else { assert(_state==XSS_NONE); _state = XSS_END_ELEMENT; } }
bool XMLStorage::XMLStateReader::has_next | ( | ) |
Definition at line 1251 of file xmlstorage.cpp.
void XMLStorage::XMLStateReader::next | ( | ) |
Definition at line 1260 of file xmlstorage.cpp.
{ _state = XSS_NONE; _parse_ctx.proceed(); }
void XMLStorage::XMLStateReader::StartElementHandler | ( | const XS_String & | name, |
const XMLNode::AttributeMap & | attributes | ||
) | [virtual] |
notifications about XML start tag
Reimplemented from XMLStorage::XMLReaderBase.
Definition at line 1267 of file xmlstorage.cpp.
{ _node_name = name; _attrs = attr; _content.erase(); assert(_state==XSS_NONE); _state = XSS_START_ELEMENT; }
Definition at line 3018 of file xmlstorage.h.
Definition at line 3017 of file xmlstorage.h.
Definition at line 3014 of file xmlstorage.h.
Referenced by XMLStorage::XMLStreamReader::XMLStreamReader().
Definition at line 3016 of file xmlstorage.h.
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |