#include <XMLTag.h>
Public Member Functions | |
XMLTag () | |
XMLTag constructor. | |
XMLTag (const XMLTag &other) | |
XMLTag copy constructor. | |
XMLTag & | operator= (const XMLTag &other) |
operator = | |
XMLTag (XMLTag &&other) | |
XMLTag move constructor. | |
XMLTag & | operator= (XMLTag &&other) |
operator = | |
bool | hasContent () const |
Checks if tag has content. | |
Public Attributes | |
std::string | element |
Tag start element content. | |
std::string | tag_id |
Tag name. | |
std::string::size_type | content_start |
Index of first byte of tag content. | |
std::string::size_type | content_end |
Index of last byte of tag content. | |
std::vector< XMLTag > | tag_list |
List of XML tags, found in tag content (if any). | |
The XMLTag class.
Auxiliary class for XMLParser. Contains tag start element content, tag name, index of tag content first byte in XML document and index of content last byte. Also contains list of tags were found in tag content.
bool XMLTag::hasContent | ( | ) | const |
Checks if tag has content.
This method returns true, if content_start and content_end are not equal to std::string::npos.
std::string::size_type XMLTag::content_end |
Index of last byte of tag content.
Index of last byte of tag content in XML document. Can be equal to std::string::npos, if tag does not have content.
std::string::size_type XMLTag::content_start |
Index of first byte of tag content.
Index of first byte of tag content in XML document. Start of tag can be found by element size subtration from content_start. If content_start value is equal to std::string::npos, it indicates error on tag reading (even if tag does not have any content).
std::string XMLTag::element |
Tag start element content.
Tag start element content including opening "<" and closing ">" symbols.