anchor.diff:  [[modify.text]]
   === Working with text contents
   
  -pugixml provides a special class, `xml_text`, to work with text contents stored as a value of some node, i.e. `<node><description>This is a node</description></node>`. Working with text objects to retrieve data is described in [link manual.access.text the documentation for accessing document data]; this section describes the modification interface of `xml_text`.
  -
  -[#xml_text::set]
  +pugixml provides a special class, `xml_text`, to work with text contents stored as a value of some node, i.e. `<node><description>This is a node</description></node>`. Working with text objects to retrieve data is described in <<manual.access.text,the documentation for accessing document data>>; this section describes the modification interface of `xml_text`.
  +
  +[[xml_text::set]]
   Once you have an `xml_text` object, you can set the text contents using the following function:
   
   [source]
  
positive.code: 
  If the node has a type `node_pcdata` or `node_cdata`, then the node itself is used to return data; otherwise, a first child node of type `node_pcdata` or `node_cdata` is used.
  
  [#xml_text::empty]
  [#xml_text::unspecified_bool_type]
  You can check if the text object is bound to a valid PCDATA/CDATA node by using it as a boolean value, i.e. `if (text) { ... }` or `if (!text) { ... }`. Alternatively you can check it by using the `empty()` method:
  
  [source]
  
negative.code: 
  The attribute is copied along with the name and value; the node is copied along with its type, name and value; additionally attribute list and all children are recursively cloned, resulting in the deep subtree clone. The prototype object can be a part of the same document, or a part of any other document.
  
  The failure conditions resemble those of `append_child`, `insert_child_before` and related functions, <<xml_node::append_child,consult their documentation for more information>>. There are additional caveats specific to cloning functions:
  
  * Cloning null handles results in operation failure;
  * Node cloning starts with insertion of the node of the same type as that of the prototype; for this reason, cloning functions can not be directly used to clone entire documents, since <<node_document,node_document>> is not a valid insertion type. The example below provides a workaround.
  * It is possible to copy a subtree as a child of some node inside this subtree, i.e. `node.append_copy(node.parent().parent());`. This is a valid operation, and it results in a clone of the subtree in the state before cloning started, i.e. no infinite recursion takes place.
  
  This is an example with one possible implementation of include tags in XML (link:samples/include.cpp[]). It illustrates node cloning and usage of other document modification functions:
  