diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-05-08 17:50:12 -0700 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-05-08 17:50:12 -0700 |
commit | fec681be83c91268ee4db97f34ce4e47179316dd (patch) | |
tree | b59a2bc6a916225a989015a2f33168b8d35b0946 /xml/serializer.hxx | |
parent | a6e24513d89067c16a3df214a7e2679e1f1675f1 (diff) |
Add helpers for serializing elements with simple content
Diffstat (limited to 'xml/serializer.hxx')
-rw-r--r-- | xml/serializer.hxx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/xml/serializer.hxx b/xml/serializer.hxx index e0041f9..d07221d 100644 --- a/xml/serializer.hxx +++ b/xml/serializer.hxx @@ -94,6 +94,42 @@ namespace xml void end_element (); + // Helpers for serializing elements with simple content. The first two + // functions assume that start_element() has already been called. The + // other two serialize the complete element, from start to end. + // + void + element (const std::string& value); + + template <typename T> + void + element (const T& value); + + void + element (const std::string& name, const std::string& value); + + template <typename T> + void + element (const std::string& name, const T& value); + + void + element (const qname_type& qname, const std::string& value); + + template <typename T> + void + element (const qname_type& qname, const T& value); + + void + element (const std::string& namespace_, + const std::string& name, + const std::string& value); + + template <typename T> + void + element (const std::string& namespace_, + const std::string& name, + const T& value); + // Attributes. // void |