diff options
Diffstat (limited to 'xml/serializer.cxx')
-rw-r--r-- | xml/serializer.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/xml/serializer.cxx b/xml/serializer.cxx index 5ed5c5e..df31b09 100644 --- a/xml/serializer.cxx +++ b/xml/serializer.cxx @@ -173,6 +173,21 @@ namespace xml } void serializer:: + end_element (const string& ns, const string& name) + { + constUtf8 cns, cn; + genxStatus e; + if ((e = genxGetCurrentElement (s_, &cns, &cn)) || + reinterpret_cast<const char*> (cn) != name || + (cns == 0 ? !ns.empty () : reinterpret_cast<const char*> (cns) != ns)) + { + handle_error (e != GENX_SUCCESS ? e : GENX_SEQUENCE_ERROR); + } + + end_element (); + } + + void serializer:: element (const string& ns, const string& n, const string& v) { start_element (ns, n); @@ -197,6 +212,21 @@ namespace xml } void serializer:: + end_attribute (const string& ns, const string& name) + { + constUtf8 cns, cn; + genxStatus e; + if ((e = genxGetCurrentAttribute (s_, &cns, &cn)) || + reinterpret_cast<const char*> (cn) != name || + (cns == 0 ? !ns.empty () : reinterpret_cast<const char*> (cns) != ns)) + { + handle_error (e != GENX_SUCCESS ? e : GENX_SEQUENCE_ERROR); + } + + end_attribute (); + } + + void serializer:: attribute (const string& ns, const string& name, const string& value) |