Error handler for XML parsing using boost spirit.
More...
#include <XMLErrorHandler.hpp>
|
enum | XMLErrors {
xml_att_unexpected
, xml_att_expected
, xml_children_expected
, xml_end_expected
,
xml_bad_end_elem
, xml_missing_brack
, xml_starttag_end_exp
, xml_bad_child
} |
| XML Error codes.
|
|
|
template<typename ScannerT , typename ErrorT > |
boost::spirit::classic::error_status | operator() (ScannerT const &scan, ErrorT const &error) const |
| Exception handling callbak. More...
|
|
|
static boost::spirit::classic::assertion< XMLError > | BadEndElem (const std::string &elemname) |
| Asserts if the element name of the endtag does not match the element name of the starttag. More...
|
|
static boost::spirit::classic::assertion< XMLError > | MissingBrac (const std::string &elemname) |
|
static boost::spirit::classic::assertion< XMLError > | AttExpected (const std::string &elemname) |
|
static boost::spirit::classic::assertion< XMLError > | StartEndExpected (const std::string &elemname) |
|
static boost::spirit::classic::assertion< XMLError > | BadChild (const std::string &elemname) |
|
|
static boost::spirit::classic::guard< XMLError > | XMLErrorGuard |
| a static instance of a spirit guard, guarding trown XLErrors
|
|
Error handler for XML parsing using boost spirit.
* starttag >> *element >> endtag
*
* example:
* <elemname>
* <elemname2></elemname2>
* </elemname>
*
◆ AttExpected()
static boost::spirit::classic::assertion<XMLError> AttExpected |
( |
const std::string & |
elemname | ) |
|
|
inlinestatic |
- Parameters
-
elemname | [in] name of the element that is being parsed |
- Returns
- spirit assertion object of XMLError type
◆ BadChild()
static boost::spirit::classic::assertion<XMLError> BadChild |
( |
const std::string & |
elemname | ) |
|
|
inlinestatic |
- Parameters
-
elemname | [in] name of the element that is being parsed |
- Returns
- spirit assertion object of XMLError type
◆ BadEndElem()
static boost::spirit::classic::assertion<XMLError> BadEndElem |
( |
const std::string & |
elemname | ) |
|
|
inlinestatic |
Asserts if the element name of the endtag does not match the element name of the starttag.
- Parameters
-
elemname | [in] name of the element that is being parsed |
- Returns
- spirit assertion object of XMLError type
◆ MissingBrac()
static boost::spirit::classic::assertion<XMLError> MissingBrac |
( |
const std::string & |
elemname | ) |
|
|
inlinestatic |
- Parameters
-
elemname | [in] name of the element that is being parsed |
- Returns
- spirit assertion object of XMLError type
◆ operator()()
boost::spirit::classic::error_status operator() |
( |
ScannerT const & |
scan, |
|
|
ErrorT const & |
error |
|
) |
| const |
|
inline |
Exception handling callbak.
- Parameters
-
- Returns
◆ StartEndExpected()
static boost::spirit::classic::assertion<XMLError> StartEndExpected |
( |
const std::string & |
elemname | ) |
|
|
inlinestatic |
- Parameters
-
elemname | [in] name of the element that is being parsed |
- Returns
- spirit assertion object of XMLError type
The documentation for this class was generated from the following file: