From b6bcf3ddfeed3f204672d5d892356ed52e3f4bb9 Mon Sep 17 00:00:00 2001 From: Tuan Anh Tran Date: Tue, 17 Sep 2019 22:36:29 +0700 Subject: [PATCH] doc: update docs for remove_children and remove_attributes --- docs/manual.adoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/manual.adoc b/docs/manual.adoc index def9ced..5a391ed 100644 --- a/docs/manual.adoc +++ b/docs/manual.adoc @@ -1378,16 +1378,18 @@ include::samples/modify_add.cpp[tags=code] [[modify.remove]] === Removing nodes/attributes -[[xml_node::remove_attribute]][[xml_node::remove_child]] +[[xml_node::remove_attribute]][[xml_node::remove_attributes]][[xml_node::remove_child]][[xml_node::remove_children]] If you do not want your document to contain some node or attribute, you can remove it with one of the following functions: [source] ---- bool xml_node::remove_attribute(const xml_attribute& a); +bool xml_node::remove_attributes(); bool xml_node::remove_child(const xml_node& n); +bool xml_node::remove_children(); ---- -`remove_attribute` removes the attribute from the attribute list of the node, and returns the operation result. `remove_child` removes the child node with the entire subtree (including all descendant nodes and attributes) from the document, and returns the operation result. Removing fails if one of the following is true: +`remove_attribute` removes the attribute from the attribute list of the node, and returns the operation result. `remove_child` removes the child node with the entire subtree (including all descendant nodes and attributes) from the document, and returns the operation result. `remove_attributes` removes all the attributes of the node, and returns the operation result. `remove_children` removes all the child nodes of the node, and returns the operation result. Removing fails if one of the following is true: * The node the function is called on is null; * The attribute/node to be removed is null; @@ -2868,8 +2870,10 @@ const unsigned int +++parse_wnorm_attribute bool +++remove_attribute+++(const xml_attribute& a); bool +++remove_attribute+++(const char_t* name); + bool +++remove_attributes+++(); bool +++remove_child+++(const xml_node& n); bool +++remove_child+++(const char_t* name); + bool +++remove_children+++(); xml_parse_result +++append_buffer+++(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);