From dac3640ed08cf18eaa6eb26605a27e6c7387b2c2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 14 Mar 2013 11:08:13 +0200 Subject: Add next_expect() functions to XML parser --- cutl/xml/parser.hxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cutl/xml/parser.hxx') diff --git a/cutl/xml/parser.hxx b/cutl/xml/parser.hxx index d7011af..5d1e9e5 100644 --- a/cutl/xml/parser.hxx +++ b/cutl/xml/parser.hxx @@ -131,6 +131,21 @@ namespace cutl } } + // Get the next event and make sure that it's what's expected. If it + // is not, then throw an appropriate parsing exception. + // + void + next_expect (event_type); + + void + next_expect (event_type, const qname_type& qname); + + void + next_expect (event_type, const std::string& name); + + void + next_expect (event_type, const std::string& ns, const std::string& name); + event_type peek () { @@ -283,4 +298,6 @@ namespace cutl } } +#include + #endif // CUTL_XML_PARSER_HXX -- cgit v1.1