From e27f214859115e3b88ce136bac425f56fe40b8f9 Mon Sep 17 00:00:00 2001 From: Will Gallia Date: Sat, 29 Dec 2018 15:54:08 +0000 Subject: [PATCH] allow writing of CDATA in XML closes #2066 --- src/cinder/Xml.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cinder/Xml.cpp b/src/cinder/Xml.cpp index c38f359fa1..6036af9ce8 100644 --- a/src/cinder/Xml.cpp +++ b/src/cinder/Xml.cpp @@ -357,7 +357,7 @@ void XmlTree::appendRapidXmlNode( rapidxml::xml_document &doc, rapidxml::x default: throw ExcUnknownNodeType(); } rapidxml::xml_node *node = 0; - if( type == rapidxml::node_data ) { + if( type == rapidxml::node_data || type == rapidxml::node_cdata ) { node = doc.allocate_node( type, NULL, doc.allocate_string( getValue().c_str() ) ); } else if( type == rapidxml::node_comment ) { @@ -436,4 +436,4 @@ XmlTree::ExcAttrNotFound::ExcAttrNotFound( const XmlTree &node, const string &at #endif } -} // namespace cinder \ No newline at end of file +} // namespace cinder