aboutsummaryrefslogtreecommitdiff
path: root/cutl/xml/parser.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'cutl/xml/parser.ixx')
-rw-r--r--cutl/xml/parser.ixx35
1 files changed, 35 insertions, 0 deletions
diff --git a/cutl/xml/parser.ixx b/cutl/xml/parser.ixx
index 61bb05b..fa5a7b6 100644
--- a/cutl/xml/parser.ixx
+++ b/cutl/xml/parser.ixx
@@ -2,10 +2,45 @@
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
// license : MIT; see accompanying LICENSE file
+#include <cutl/xml/value-traits.hxx>
+
namespace cutl
{
namespace xml
{
+ inline const std::string& parser::
+ attribute (const std::string& n) const
+ {
+ return attribute (qname_type (n));
+ }
+
+ template <typename T>
+ inline T parser::
+ attribute (const std::string& n) const
+ {
+ return attribute<T> (qname_type (n));
+ }
+
+ inline std::string parser::
+ attribute (const std::string& n, const std::string& dv) const
+ {
+ return attribute (qname_type (n), dv);
+ }
+
+ template <typename T>
+ inline T parser::
+ attribute (const std::string& n, const T& dv) const
+ {
+ return attribute<T> (qname_type (n), dv);
+ }
+
+ template <typename T>
+ inline T parser::
+ attribute (const qname_type& qn) const
+ {
+ return value_traits<T>::parse (attribute (qn), *this);
+ }
+
inline void parser::
next_expect (event_type e, const qname_type& qn)
{