From a50f47f8056ffbb5fc52f2db07858c7dcd511d2e Mon Sep 17 00:00:00 2001
From: "arseny.kapoulkine@gmail.com"
xml_text
is essentially a
helper class that operates on xml_node
values. It is bound to a node of type node_pcdata
- or [node_cdata]. You can use the following function to retrieve this node:
+ or node_cdata. You can use the following
+ function to retrieve this node:
xml_node xml_text::data() const;
Essentially, assuming text
- is an xml_text
object, callling
+ is an xml_text
object, calling
text.get()
is
equivalent to calling text.data().value()
.
This function tries to set the contents to the specified string, and returns the operation result. The operation fails if the text object was retrieved - from a node that can not have a value and that is not an element node (i.e. - it is a node_declaration node), if - the text object is empty, or if there is insufficient memory to handle the - request. The provided string is copied into document managed memory and can - be destroyed after the function returns (for example, you can safely pass - stack-allocated buffers to this function). Note that if the text object was - retrieved from an element node, this function creates the PCDATA child node - if necessary (i.e. if the element node does not have a PCDATA/CDATA child - already). + from a node that can not have a value and is not an element node (i.e. it + is a node_declaration node), if the + text object is empty, or if there is insufficient memory to handle the request. + The provided string is copied into document managed memory and can be destroyed + after the function returns (for example, you can safely pass stack-allocated + buffers to this function). Note that if the text object was retrieved from + an element node, this function creates the PCDATA child node if necessary + (i.e. if the element node does not have a PCDATA/CDATA child already).
In addition to a string function, several functions are provided for handling diff --git a/docs/manual/saving.html b/docs/manual/saving.html index 2be70cb..d0b2e02 100644 --- a/docs/manual/saving.html +++ b/docs/manual/saving.html @@ -465,7 +465,7 @@
When you are saving the document using xml_document::save()
or xml_document::save_file()
, a default XML document declaration is
output, if format_no_declaration
- is not speficied and if the document does not have a declaration node. However,
+ is not specified and if the document does not have a declaration node. However,
the default declaration is not customizable. If you want to customize the
declaration output, you need to create the declaration node yourself.