|
From: <vac...@us...> - 2010-03-11 15:29:49
|
Revision: 175
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=175&view=rev
Author: vaclavslavik
Date: 2010-03-11 15:29:43 +0000 (Thu, 11 Mar 2010)
Log Message:
-----------
Clarified xml::node::set_content() argument docs.
Like xmlNodeSetNontent(), this function expects valid CDATA fragment,
meaning that passing e.g. "M&M" to it is undefined and breaks silently.
Modified Paths:
--------------
trunk/include/xmlwrapp/node.h
Modified: trunk/include/xmlwrapp/node.h
===================================================================
--- trunk/include/xmlwrapp/node.h 2010-03-11 15:29:23 UTC (rev 174)
+++ trunk/include/xmlwrapp/node.h 2010-03-11 15:29:43 UTC (rev 175)
@@ -282,6 +282,12 @@
with one text node set to the given string.
@param content The content of the text node.
+
+ @note @a content is supposed to be a piece of XML CDATA, so it allows
+ entity references, but XML special chars need to be escaped
+ first. In particular, the '&' character @em must be escaped
+ as "&" unless it's part of entity reference. Not escaping
+ @a content may result in truncation of data.
*/
void set_content(const char *content);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|