[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master fd8809d 7/7: Resolve all 'XMLWRAPP !!' marker
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master fd8809d 7/7: Resolve all 'XMLWRAPP !!' markers but one |
Date: |
Wed, 27 Mar 2019 11:06:46 -0400 (EDT) |
branch: master
commit fd8809dbb3f971367e8cf5a7fc2254870483dc52
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Resolve all 'XMLWRAPP !!' markers but one
---
xml_lmi_fwd.hpp | 8 +++++---
xml_serialize.hpp | 6 +-----
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/xml_lmi_fwd.hpp b/xml_lmi_fwd.hpp
index 95772b6..e85b737 100644
--- a/xml_lmi_fwd.hpp
+++ b/xml_lmi_fwd.hpp
@@ -33,9 +33,11 @@ namespace xml // This is xmlwrapp's namespace.
class schema;
class tree_parser;
- /// XMLWRAPP !! It is useful to distinguish elements from DOM
- /// nodes that are not elements; xmlwrapp doesn't make this
- /// distinction, but a future replacement might.
+ // It would be useful to distinguish elements from DOM nodes that
+ // are not elements; xmlwrapp doesn't make this distinction,
+ // because libxml2 doesn't. See:
+ // https://lists.nongnu.org/archive/html/lmi/2019-03/msg00048.html
+ // et seqq.
typedef xml::node element;
} // namespace xml
diff --git a/xml_serialize.hpp b/xml_serialize.hpp
index 5c6e901..cef39da 100644
--- a/xml_serialize.hpp
+++ b/xml_serialize.hpp
@@ -60,11 +60,7 @@ struct xml_io
static void to_xml(xml::element& e, T const& t)
{
- e.clear();
- // XMLWRAPP !! Someday, this might be rewritten thus:
- // e.set_content(value_cast<std::string>(t).c_str());
- // but for now that doesn't work with embedded ampersands.
-
e.push_back(xml::node(xml::node::text(value_cast<std::string>(t).c_str())));
+ e.set_text_content(value_cast<std::string>(t).c_str());
}
static void from_xml(xml::element const& e, T& t)
- [lmi-commits] [lmi] master updated (63529b4 -> fd8809d), Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master 2879c8e 1/7: Vaporize 'java', Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master 1f46780 3/7: Add an include directory for architecture-dependent packages, Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master fd8809d 7/7: Resolve all 'XMLWRAPP !!' markers but one,
Greg Chicares <=
- [lmi-commits] [lmi] master 232ae5d 4/7: Expunge obsolete documentation, Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master 1e02b2d 2/7: Refactor: specify makefile directories at a lower level, Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master dc3854e 5/7: Replace literal '/opt/lmi/local' with makefile variables set OAOO, Greg Chicares, 2019/03/27
- [lmi-commits] [lmi] master d969290 6/7: Use $LMI_HOST more flexibly in makefiles and scripts, Greg Chicares, 2019/03/27