SSS - S3 Toolkit 0.9.6
S3 client library and applications
Loading...
Searching...
No Matches
XMLIStream Class Reference

XML parser, returns array of text elements with the same parent path or an array of parsed XML sub trees. More...

#include <xmlstreams.h>

Public Member Functions

const XMLIStreamoperator[] (const std::string &p) const
 
 operator std::string () const
 
 operator std::vector< std::string > () const
 
 operator std::vector () const
 
 XMLIStream (const std::string &xml)
 

Detailed Description

XML parser, returns array of text elements with the same parent path or an array of parsed XML sub trees.

An XML subtree is represented as record in the form

map<path to text element, text element>

under the specifed path.

This class stores data of different types inside a variant object and extracts the value when the class instance is converted to a type during assignment operations.

Since the returned types all have empty values, if the path or text is not found an empty std::string, std::vector or std::unordered_map is returned.

See also
XMLResult

Constructor & Destructor Documentation

◆ XMLIStream()

XMLIStream::XMLIStream ( const std::string &  xml)
inline

Constructor

Parameters
[in]xmlxml text

Member Function Documentation

◆ operator std::string()

XMLIStream::operator std::string ( ) const
inline
Returns
current element text or empty string

◆ operator std::vector()

XMLIStream::operator std::vector ( ) const
inline
Returns
array of parsed records or empty array

◆ operator std::vector< std::string >()

XMLIStream::operator std::vector< std::string > ( ) const
inline
Returns
array of text elements or empty array

◆ operator[]()

const XMLIStream & XMLIStream::operator[] ( const std::string &  p) const
inline

Extract array of text elements under specified path or list of records in the form map<path to text element, text element>.

Parameters
[in]ppath to text elements if path starts with '/' or to sbtrees under path if it does not start with '/'
Returns
reference to current instance
See also
RecordList

References RecordList().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: